> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bead.run/llms.txt
> Use this file to discover all available pages before exploring further.

# Sandbox data deletion

> Understand sandbox data deletion, funded retention, credit grace, and the separate cleanup operations for each resource.

Sandbox data deletion and retention depend on the resource. Pause preserves machine state; deletion retires the resource through its lifecycle operation.

## How long data stays

| Resource | Retention behavior |
| - | - |
| Temporary machine | Deletes when its timeout ends, or when you explicitly delete it. |
| Persistent machine | Keeps memory and disk across pause while retained storage is funded. |
| Saved snapshot | Retained until deleted, its optional expiry, or the funding grace deadline. |
| Worktree output spool | Until the next managed command or machine deletion, bounded to 64 MiB. |
| Project vault values | Remain stored until removed through vault controls. |
| Purchase and financial receipts | Retained for audit. |

## Paused storage and credit grace

Paused persistent machines incur storage charges. If funding cannot renew, the default grace period is 14 days; the period is configurable. Inspect the returned grace deadline rather than calculating a deadline from this page.

Memory and disk remain during grace. Storage that cannot be charged during grace is a platform cost, with no retroactive storage debt after top-up. Adding credit can fund a new window. After grace ends, normal lifecycle deletion retires the machine.

Snapshots use the same funded storage and credit grace model. A caller-set snapshot expiry is independent of funding. See [Snapshot retention](https://docs.bead.run/snapshots/retention.md).

## Delete a machine

```bash theme={null}
bead delete MACHINE_ID
bead list
```

Check the returned deletion operation and wait for completion when the API returns an operation ID. Its status is available at `GET /operations/OPERATION_ID`:

```bash theme={null}
bead api GET /operations/OPERATION_ID
```

A submitted delete or missing response does not by itself confirm completed cleanup. Read status before retrying an uncertain operation. Confirmed authorized usage can still settle after deletion.

## Clean up separate resources

Delete saved snapshots and independent fork children separately. `bead worktree down` removes the bound machine; prepared snapshots and templates remain separately retained.

[Volumes](https://docs.bead.run/platform/volumes.md) have independent retention deadlines and remain after machine deletion releases their attachment during cleanup. Detach an attached volume before requesting `DELETE /volumes/VOLUME_ID`, then inspect `GET /volumes` until cleanup completes.

Remove a project vault name with `bead env unset NAME` from the project. Local source caches remain until you remove them; acknowledged `worktree down` removes that machine’s local artifact cache, so copy needed artifacts elsewhere first. Deleting a local secret does not erase its contents from an existing remote snapshot.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.