Share feedback
Answers are generated based on the documentation.

sbx rm

DescriptionRemove one or more sandboxes
Usagesbx rm [SANDBOX...] [flags]

Description

Remove one or more sandboxes and all associated resources. Or — with --cloud — the cloud sandbox ID (sbx_*) or name from "sbx --cloud ls".

For local sandboxes, stops them, removes their containers, cleans up any Git worktrees, deletes sandbox state, and deletes secrets scoped to each removed sandbox. This action cannot be undone. With --cloud, deletes the sandbox in Docker Sandboxes Cloud. This action cannot be undone.

Removal requires confirmation; use --force to skip confirmation prompts (for non-interactive scripts) and to delete a sandbox that is in use (e.g. an open SSH connection). Use --all to remove every sandbox. With --cloud, --all is intentionally disabled as a safety gate — the blast radius covers every sandbox the credential can see, which may include shared or production workloads. Pass IDs explicitly in --cloud mode.

Options

OptionDefaultDescription
--allRemove all sandboxes
-f, --forceSkip confirmation prompts and delete even if in use (e.g. an open SSH connection)

Global options

OptionDefaultDescription
--cloudDispatch to Docker Cloud Sandboxes API instead of local sandboxd (supported by a growing set of verbs — run 'sbx --cloud --help' for the current list)
--cloud-api-urlhttps://api.sandboxes-cloud.docker.comCloud Sandboxes API base URL; only used with --cloud. Defaults to prod (https://api.sandboxes-cloud.docker.com). Set DOCKER_CLOUD_API_URL or pass this flag to override; a legacy value ending in /v1 is accepted.
-D, --debugEnable debug logging