Tear down safely
Destroy removes the sandbox and ends sbxm management for a project:
sbxm destroy <project-id>Before deleting anything, sbxm shows what will be removed and what remains. It checks dirty worktrees, unpublished commits, repository-level refs, active sessions, and other conditions that could make data disappear unexpectedly.
A commit on a branch, a tag, or a worktree’s HEAD that is not on the origin is kept once it is saved into the host repository. When such commits are the only thing stopping the teardown, an interactive terminal offers to save them and continue. Stash and notes commits are not saved this way.
A stopped sandbox is started so those checks can read it, and a notice says so next to the plan. The start prepares nothing else, and cancelling the confirmation leaves the sandbox running. Destroy never sends you to open first: a project whose first build was interrupted is removable exactly as it is.
Choosing a project at the prompt deletes nothing on its own. After the plan, sbxm asks you to type the project ID — <owner>/<repository>, what you would pass on the command line, not the internal sandbox name. The prompt shows what to type, asks again when the answer names something else, and Esc cancels the whole thing.
Removed
Section titled “Removed”- the Docker Sandbox
- the project metadata used by sbxm
- the
GH_TOKENcustom secret registered for that sandbox
Removing the custom secret matters: a stale registration can make the next registration fail as a duplicate and can leave a token attached to a sandbox that no longer exists.
- the host clone
- the project Dockerfile
- built images
- loaded templates
- secrets registered for other sandboxes
Because sbxm never adopts an unregistered directory, registering the project again in the same place may require moving the old project directory aside first.
sbxm destroy --force <project-id>--force skips data-protection and active-session checks and does not prompt for confirmation. Use it only after independently confirming that nothing inside the sandbox needs to be preserved.