Skip to content

isb 4.2.0: volumes left behind by removed sandboxes are cleaned up - #83

Merged
knowsuchagency merged 3 commits into
mainfrom
we-need-to-make-97ya
Nov 17, 2026
Merged

knowsuchagency merged 3 commits into
mainfrom
we-need-to-make-97ya

Conversation

@knowsuchagency

Copy link
Copy Markdown
Contributor

What

A volume created by a plain sandbox (isb up, isb create, the SDK and MCP sandbox_create) is labelled user.isb.sandbox. Once that sandbox is gone and nothing has the volume attached, isb serve deletes it after sandbox_volume_ttl (default 7d, none turns it off).

  • keep: true on a volume definition opts a volume out (shared caches).
  • isb volume prune lists volumes whose sandbox is gone; -y deletes. --unattached covers unlabelled leftovers and needs name patterns to delete.
  • isb sandbox settings --volume-ttl, and sandbox_volume_ttl on the sandbox_settings tool.
  • isbx removes a VM tool's cache volume with the tool; isb x doctor notes a dir pool (every sandbox a full copy of its image).

Stack, app, database, job and backup volumes, isb volume create volumes and external volumes are never labelled or swept.

Why

On a host with a dir pool, per-sandbox cache volumes (${SANDBOX_NAME}-modules) outlived their sandboxes forever: about 100 GB on titan.

Verified

scripts/check.sh green in a sandbox; tests/volume_owner.rs integration tests pass against real incus.

https://claude.ai/code/session_01LJ21XpNb5uQ2Ez9dt17GN8

A volume created by a plain sandbox (isb up, isb create, the SDK and MCP
create) is labelled user.isb.sandbox. Once that sandbox is gone and nothing
has the volume attached, isb serve deletes it after sandbox_volume_ttl
(default 7d, none disables). keep: true on a volume definition opts out.
isb volume prune lists and deletes them by hand, and --unattached covers
unlabelled leftovers by name pattern. isbx removes a VM tool's cache volume
with the tool, and isb x doctor notes a dir pool.

Claude-Session: https://claude.ai/code/session_01LJ21XpNb5uQ2Ez9dt17GN8
@knowsuchagency
knowsuchagency merged commit 61385f6 into main Nov 17, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant