msb df and remove unused runtime memory files with msb prune. Both commands are local-only. For application code, see SDK storage.
msb df
Show storage used by images, snapshots, sandboxes, volumes, and runtime memory files:--verbose for object paths, ownership, and accounting details, or --format json for structured output. Use msb inspect NAME or msb snap inspect REF to inspect one sandbox or snapshot.
RECLAIMABLE shows unused runtime memory files eligible for cleanup. Reported sizes may differ from the disk space actually freed, especially when files share data.
How storage is measured
How storage is measured
The table always includes images, durable snapshots, branch memory, snapshot memory, sandboxes, and volumes, even when their measured usage is zero.
--verbose adds object paths, allocated-block observations, and reasons entries are retained or could not be measured. Unknown measurements appear as - in tables and null in JSON.Image references share layers, so image accounting scans the shared cache instead of summing each image’s advertised size. Managed-directory totals include metadata and unindexed files. Indexed external snapshot directories are included; host bind mounts, external linked payloads, unindexed external snapshots, and anonymous Linux RAM are excluded. Concurrent filesystem activity can change measurements while a scan runs.Logical file lengths and allocated blocks do not measure unique physical storage on filesystems with shared copy-on-write extents. Removing 1 GiB of logical data may free less physical space. There is no combined total when categories may overlap.
msb prune
Preview cleanup, then run it:msb image prune.
Files still in use are skipped. Without --yes, cleanup asks for confirmation in an interactive terminal. The result can differ from the preview if files become active in the meantime.
--dry-run: preview without deleting files.--yes: skip the confirmation prompt.--older-than 10m: only consider files at least ten minutes old. Accepts a nonnegative integer withs,m,h, ord; defaults to0s.--format json: return a structured report.-q,--quiet: suppress successful human output. Does not skip confirmation and cannot be combined with JSON.
Cleanup rules and JSON output
Cleanup rules and JSON output
Prune only removes recognized, published runtime RAM files with no live backing pin or pending branch handoff. Stable lock files and capture staging directories are retained. The age filter uses file modification times, which clones can inherit; ownership is checked again before removal.JSON includes
entries, files_removed, logical_bytes_removed, and physical_bytes_reclaimed. The latter remains null: the command does not claim physical storage savings. Entries explain in_use, pending_handoff, too_young, missing_handoff_lock, changed, or error decisions. An error report retains successful removal counts and exits unsuccessfully; a caller can retry later. Dry-run entries use reclaimable and removal counters remain zero.Automatic branch cleanup
Unused branch memory files are also cleaned up automatically when possible. Paused sandboxes keep their backing files. Cached snapshot memory stays available for faster restores until you explicitly prune it.When automatic cleanup runs
When automatic cleanup runs
Branch backing is reclaimed best-effort after its last tracked SDK or baseline owner releases it, provided no other pin or handoff remains. Paused sandboxes retain their backing. Runtime process exit and abrupt termination release kernel pins. After a graceful stop, cleanup tries the stopped branch’s exact backing file and then traverses the branch cache in bounded passes without pauses between them; CLI commands wait for that traversal after the graceful-stop result, while SDK callers can continue without waiting. A subsequent branch also triggers a bounded sweep for leftovers, limited to once every 30 seconds within one SDK process.Automatic cleanup targets branch memory. Unused snapshot RAM realizations remain available for warm restores until explicitly pruned. Neither path changes memory bytes, snapshot formats, or checkpoint sparsity.