Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.celesto.ai/llms.txt

Use this file to discover all available pages before exploring further.

When you upgrade SmolVM, the new release pulls a fresh set of pre-built sandbox images. The images from older releases stay on disk under ~/.smolvm/images/ and slowly add up. The smolvm prune command finds those leftover image folders and deletes them so you get the space back. Run it any time after an upgrade. It only touches caches that belong to versions you’re no longer using, so your current sandboxes keep working.

Synopsis

smolvm prune [OPTIONS]

Options

--dry-run
flag
default:"false"
Show what would be deleted without removing anything. Useful for previewing the targets before you commit.
--json
flag
default:"false"
Print results as JSON instead of a formatted table. Useful for scripts and automation.

Examples

Preview before deleting

Always safe to run first — it never deletes:
smolvm prune --dry-run
Example output:
Stale image caches (2):
  - ~/.smolvm/images/0.0.12/   (412 MB)
  - ~/.smolvm/images/0.0.13/   (487 MB)

Total reclaimable: 899 MB
Dry run complete. No changes made.

Reclaim disk space

Delete the stale caches:
smolvm prune
Example output:
Removed: ~/.smolvm/images/0.0.12/
Removed: ~/.smolvm/images/0.0.13/
Reclaimed 899 MB.

JSON output for automation

Get a machine-readable report:
smolvm prune --json
The --json flag emits a structured object listing the cache directories that were considered, which were removed, and the total bytes reclaimed. Pipe into jq to extract specific fields, or combine with --dry-run to inspect targets without deleting:
smolvm prune --dry-run --json | jq .

What gets deleted

smolvm prune only removes cached image folders for SmolVM versions other than the one currently installed. The current version’s cache is preserved. It does not touch:
  • Running sandboxes or their state
  • Custom images you built with ImageBuilder
  • Snapshots stored under ~/.smolvm/snapshots/
  • SSH keys under ~/.smolvm/keys/
If you upgrade SmolVM frequently, run smolvm prune periodically to keep your cache footprint small. Each release ships a fresh set of pre-built rootfs and kernel artifacts.

Exit codes

CodeDescription
0Success — caches removed (or none found)
1Error reading or deleting cache files
Last modified on May 7, 2026