Skip to content

Removing boxes

Delete a box and its disk with abx rm, what it refuses, and where the transcripts go.

Updated

abx stop keeps a box’s disk. abx rm deletes the machine and the staging repository and archives the box’s record. Use it when you are done with a box, usually after you have landed its work.

abx rm fix-auth
abx rm old-task spike --force
abx rm old-task --workspace c9e7bfe9 --force
abx rm fix-auth --if-exists --json

Give several names to remove them all. With several names, each failure is reported and the exit status is 1.

What rm refuses

Without --force, rm refuses:

  • A running box (box-running). Exit its sessions and run abx stop first.
  • A Git box whose task branch holds commits that were neither in its base nor landed with abx land (unlanded-commits). To check, rm starts a stopped Git box briefly and stops it again.
  • A box whose machine is missing (machine-missing), because its commits cannot be checked.

rm does not check uncommitted guest changes or the files of a scratch box.

Options

Option Effect
--workspace WORKSPACE Targets a registered workspace by id, short id, name, or path without relinking a host folder. Useful for cleaning up boxes in missing folder or id differs workspaces. Cannot be combined with --no-git.
--force Stops a running box first and deletes guest commits that were never landed. Also archives a box whose machine is missing, unless it holds a shared guest login profile.
--if-exists Succeeds for a box that does not exist and lists it as absent, so the command can be repeated.
--json Prints machine-readable JSON on stdout.

Without --if-exists, a missing box is an error.

What is archived

rm moves the box directory, with its box.json and agent transcripts, from boxes/<box>-<id8>/ to archive/<box>-<id8>/ in the workspace’s directory under $ABX_HOME/workspaces, and prints the path of the archived transcripts/. It never deletes transcripts. A later box with the same name gets a new directory.

See Boxes for the lifecycle and Files for the directory layout. Run rm from the workspace that owns the box, pass -C DIR, or pass --workspace WORKSPACE to target an unlinked or missing-folder workspace directly.

Type to search…

↑↓ navigate↵ selectEsc close