previewctl down
Usage
previewctl down [name or id]Description
Stops a preview environment by name or ID.
If no argument is given, PreviewCtl looks for preview environments in the current workspace. If exactly one exists, it is stopped automatically. If multiple exist, they are listed and you must specify one by name or ID.
This command:
- Looks up the environment by name, falling back to ID
- Stops and removes all Docker containers on the preview network
- Removes the Docker network
- Updates the environment status to
stopped
Unlike delete, down preserves the environment record, port mappings, and data directory. You can bring the environment back up later with previewctl up.
Arguments
| Argument | Required | Description |
|---|---|---|
[name or id] | No | Name or ID of the preview environment to stop. If omitted, auto-selects from the current workspace. |
Examples
Stop by name:
previewctl down my-project-mainStop by ID:
previewctl down abc123Auto-select from current workspace:
previewctl downBring it back up later:
previewctl upOutput
stopped frontendstopped apistopped postgresstopped redisremoving network "my-project-main"...preview environment "my-project-main" stoppedDown vs Delete
down | delete | |
|---|---|---|
| Stops containers | Yes | Yes |
| Removes network | Yes | Yes |
| Preserves data directory | Yes | No |
| Preserves port mappings | Yes | No |
| Preserves database records | Yes | No |
Can up again | Yes | No |