> ## Documentation Index
> Fetch the complete documentation index at: https://celestoai-mintlify-f11a6371.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# smolvm sandbox delete

> Use smolvm sandbox delete to remove one sandbox or clean up every sandbox on the host with a confirmation step.

`smolvm sandbox delete` removes sandboxes and releases their stored resources. Use it for normal cleanup after a workflow, or with `--all` when you want to clear every sandbox on the host.

## Synopsis

```bash theme={null}
smolvm sandbox delete <sandbox...> [OPTIONS]
smolvm sandbox delete --all [OPTIONS]
```

## Arguments

<ParamField path="sandbox..." type="string">
  One or more sandbox names or IDs to delete.
</ParamField>

## Options

<ParamField path="--all" type="flag">
  Delete every sandbox on the host.
</ParamField>

<ParamField path="--force" type="flag">
  Skip the confirmation prompt for `--all`. Required for `--all --json`.
</ParamField>

<ParamField path="--dry-run" type="flag">
  Show what would be deleted without deleting anything.
</ParamField>

<ParamField path="--json" type="flag">
  Print a JSON envelope instead of formatted text.
</ParamField>

<Warning>
  `smolvm sandbox delete --all --force` deletes every sandbox on the host. Use `--dry-run` first when you are unsure.
</Warning>

## Examples

### Delete one sandbox

```bash theme={null}
smolvm sandbox delete my-sandbox
```

### Delete several sandboxes

```bash theme={null}
smolvm sandbox delete test-a test-b old-agent
```

### Preview full cleanup

```bash theme={null}
smolvm sandbox delete --all --dry-run
```

### Delete every sandbox

```bash theme={null}
smolvm sandbox delete --all --force
```

### Use JSON in automation

```bash theme={null}
smolvm sandbox delete --all --force --json
```

## What gets cleaned up

For each target, SmolVM stops the sandbox if needed, removes its runtime state, releases network resources, deletes the per-sandbox disk state it owns, and removes the sandbox's `<vm_id>.log` runtime log.

### Reclaiming a leaked disk

If a sandbox row has already been dropped from the inventory but its per-sandbox disk still exists on disk, `smolvm sandbox delete <id>` reclaims the disk by deriving its path from the sandbox ID instead of failing with "not found". This covers cases where a crash or an interrupted teardown left a disk behind without a matching row.

To sweep leftovers from sandboxes whose IDs you no longer know, use [`smolvm sandbox prune`](/smolvm/cli/sandbox-prune).

## Related commands

* [`smolvm sandbox list`](/smolvm/cli/list) - Review targets before deleting
* [`smolvm sandbox stop`](/smolvm/cli/stop) - Stop without deleting
* [`smolvm sandbox prune`](/smolvm/cli/sandbox-prune) - Sweep disks and logs left behind by deleted sandboxes
* [`smolvm prune`](/smolvm/cli/prune) - Remove old image caches
