Skip to content

kaxa destroy ​

Destroy one or more sandboxes. rm is an alias. Destroying a sprite deletes its persisted state.

bash
kaxa destroy [name]
kaxa rm [name]

Flags ​

FlagMeaning
--allDestroy every sandbox. Takes no name. Covers every configured provider unless --provider is set
--providerLimit the scope to one provider (sprites, modal, e2b, docker, daytona, blaxel). Without --all it also picks the provider for a name
--force, -fSkip every confirmation

How a target is chosen ​

CommandWhat it destroysConfirmation
kaxa destroy my-boxThat sandbox on the selected provider (--provider, KAXA_DEFAULT_PROVIDER, or sprites)[y/N]
kaxa destroyThe sandboxes you select from every configured providerThe selection form
kaxa destroy --all --provider modalEvery sandbox on that provider[y/N]
kaxa destroy --allEvery sandbox on every configured providerTwo [y/N] prompts

Messages always name the provider, for example sandbox demo on modal was destroyed.

No name: pick from every provider ​

With no name and without --all, a form lists the sandboxes of every provider that has credentials, as name status provider. Providers without credentials are skipped. Add --provider to see only one.

The form uses the Dracula theme. In a terminal, select rows and confirm in the form. When stdin is not a terminal, enter numbers to toggle and 0 to confirm. The form is the confirmation, so --force does not skip it.

--all: two confirmations ​

--all without --provider is the widest scope kaxa has, so it asks twice:

text
Destroy all 5 sandboxes across modal, sprites? [y/N]:
This cannot be undone. Really destroy all 5 sandboxes across modal, sprites? [y/N]:

Anything other than y or yes at either prompt prints destroy cancelled and nothing is destroyed. With --provider, only that provider is affected and a single prompt is asked.

If a provider fails to list, kaxa prints a warning and --all covers only the providers that answered. If one destroy fails, the run stops there and the error names the sandbox; the ones already destroyed stay destroyed.

The d key in list still asks. It does not read --force.

bash
kaxa destroy                           # pick from every provider
kaxa destroy my-sprite
kaxa destroy --provider modal my-box
kaxa destroy --all                     # everything, two confirmations
kaxa destroy --all --provider modal    # only Modal, one confirmation
kaxa destroy -f --all                  # everything, no confirmation

Empty --all prints no sandboxes to destroy.

Snapshots ​

destroy does not delete snapshots. A Modal, Docker, or Daytona snapshot outlives its sandbox, so you can restore it into a new sandbox after the source is gone; it stays until you run kaxa snapshot delete, or on Modal until Modal expires it after 30 days. kaxa does not delete a Blaxel snapshot when it destroys the sandbox. Restore is in place and needs that sandbox. Delete a snapshot you no longer want with kaxa snapshot delete. A sprite takes its persisted state with it. An E2B sandbox is killed, and its paused disk goes with it. See snapshot.

On Daytona, destroy deletes the sandbox through the API and everything in it; images from snapshot stay until you delete them. kaxa only destroys sandboxes it created.

On Blaxel, destroy deletes the sandbox through the API and everything in it. kaxa only destroys sandboxes it created. kaxa does not delete snapshots during destroy. Restore is in place, so it needs the sandbox.

On Docker, destroy deletes the sandbox through the API and waits until Docker no longer lists it, which frees its place in the quota. kaxa only destroys sandboxes it created.