SkillsReviewed · smol-machines

smolvm Teardown

smolvm Teardown is a cleanup skill for developers and coding assistants using smolvm, but its clean result covers only selected state and process checks. It combines macOS and Linux Bash helpers with Windows and Kubernetes guidance to remove machines, find surviving VM processes and inspect leftover data.

Researched 16 Nov 2026

In short.

smolvm Teardown is a cleanup skill for developers and coding assistants using smolvm, but a clean result does not establish that an entire host is free of smolvm state. It inventories storage, deletes recorded machines and their branches, detects surviving VM processes and checks selected directories. The latest full script verification reported by the project covers macOS arm64 with smolvm v1.29.0; other platforms have older or partial evidence. The scripts also expose limits around shared installation paths, retained caches and failure reporting.

Researched and written by an AI model and checked by a second AI model. How it works

The selected scope is docs/teardown at revision 9890e8a28b06a03270de95488122535ba690210b: SKILL.md, README.md, references/kubernetes.md, references/locations.md, references/traps.md, references/windows.md, scripts/cleanup.sh, scripts/preflight.sh and scripts/verify-clean.sh. Related rights evidence comprises the root LICENSE and THIRD-PARTY-NOTICES.md. Runtime binaries, linked installers, deployment scripts, other skill folders and referenced documents outside this folder are excluded. No commands or scripts were executed for this report. Runtime outcomes are attributed to the project's documentation; source-derived findings do not establish exhaustive process detection, complete data removal or compatibility on other releases.

The overview

Identity

The resource is the docs/teardown folder in smol-machines/smolvm. Its entry point is SKILL.md, accompanied by README.md, three Bash scripts and four references covering state locations, cleanup traps, Windows and Kubernetes. It supplies instructions an assistant can load together with executable cleanup helpers.

Original source: [https://github.com/smol-machines/smolvm/tree/main/docs/teardown]. This report concerns revision 9890e8a28b06a03270de95488122535ba690210b, available at [https://github.com/smol-machines/smolvm/tree/9890e8a28b06a03270de95488122535ba690210b/docs/teardown].

Assessment

The skill is useful for smolvm sessions that can leave processes or storage behind after interruption. Its strongest feature is the explanation of misleading signals: an empty machine list can miss some surviving processes, while ordinary cache directories can look like leaked machines.

It requires an operator who can interpret ownership, paths and individual results. Plain cleanup.sh already attempts machine deletion; --reap adds forced process termination. verify-clean.sh provides a bounded diagnostic result, with exclusions and detection assumptions that matter on shared hosts.

Users

The main users are developers and coding assistants managing disposable smolvm machines, interrupted runs, checkpoints, packs or installations on borrowed hosts. Beginners receive explanations of where state lives; experienced developers get process-matching details, environment overrides and version-specific failure cases.

Windows users must follow the manual reference because the Bash helpers do not run there. Kubernetes teardown is an administrator task: the runtime installation and its root-owned state extend beyond the operator's home directory. Shared hosts need particular care because process termination and branch deletion can affect work outside the recorded machine list.

Capabilities

preflight.sh is intended to inventory state without deleting files or starting a VM. It reports the installed version, platform, virtualization access, directory sizes, launcher symlink, shell PATH configuration and selected caches. Its ready result does not assert that cleanup has happened.

cleanup.sh records machine names, attempts removal of eligible recorded machines, waits up to 20 seconds for temporary machine entries to retire, and reports matching VM processes. --reap sends SIGKILL to discovered processes; --purge removes the tracking file when the machine listing is empty.

verify-clean.sh checks the machine listing, counts selected nonempty VM directories and looks for matching processes. It reports retained restore caches separately. Repeated --protected arguments add modification-time checks for nominated installation directories.

Using it

Requirements

The automated path requires Bash, macOS or Linux, standard shell utilities and access to the relevant smolvm installation and state. SMOLVM can identify the executable when it is not found on PATH. The supplied folder does not specify minimum Bash or utility versions.

Correct environment settings are part of the operating requirements. HOME, Linux XDG paths and SMOLVM_DATA_DIR influence state discovery. SMOLVM_PREFIX controls executable-based process matching; SMOLVM_VMS_DIR overrides the process scanner's VM directory. A nondefault installation needs these paths reviewed.

preflight.sh reports macOS Hypervisor.framework or Linux KVM access, but its final ready status does not require the reported acceleration access to be successful. Windows requires the separate PowerShell procedure; Kubernetes removal requires elevated privileges.

Mechanism

By default, cleanup.sh stores recorded names in teardown.machines beneath the XDG state directory or HOME/.local/state/smolvm-skills. SMOLVM_SKILL_STATE_DIR can override that location. For each recorded name beginning with smolskill-, it checks whether the machine is still listed, attempts stop, and invokes delete with --force --cascade. Cascade also removes branch descendants, including descendants whose names were never recorded.

On Linux, process discovery reads /proc process names for libkrun VM or VM: prefixes, then uses a boot-configuration path or executable-prefix match. On macOS, it uses executable paths and parent relationships. These approaches address VM children whose command lines do not contain an obvious VM marker.

The verification helper combines listing, directory and process checks. It excludes shared and restore-cache directories from its VM residue count, reports the audited HOME and scanned prefix, and exits nonzero when one of its explicit checks fails.

Setup

Keep the complete folder together so SKILL.md retains its scripts and reference files. The documented commands are relative to docs/teardown. The supplied files do not establish a universal assistant installation command.

Before cleanup, identify the executable, installation prefix, state paths and machines belonging to the intended session. Keep the same environment when running inventory, cleanup and verification. Read the tracking file and branch relationships before plain cleanup.sh, because that invocation performs deletion as well as reporting.

For an isolated macOS or Linux session, the documentation describes using a scratch HOME; Linux isolation also depends on the relevant XDG settings. --protected accepts installation directories individually, and --since sets the modification-time cutoff. The documentation says Windows state could not be relocated on the versions it describes.

Example

Suppose a session created a disposable machine named smolskill-example. From docs/teardown, scripts/cleanup.sh --record smolskill-example records its name. scripts/preflight.sh inventories state; scripts/cleanup.sh attempts removal of the recorded machine and its branches; scripts/verify-clean.sh evaluates the configured profile. This is an illustrative sequence, with no execution outcome established here.

When reading verification output, check audited_home and scanned_prefix alongside the individual results. restore_cache=present can coexist with result=clean because retained checkpoint memory and disks are excluded from the VM residue count. protected=not_checked means the separate protected-directory assertion was omitted.

Assessment & evidence

Limitations

result=clean is not a complete uninstall or data-erasure assertion. The verifier excludes shared stores, restore caches and checkpoint scratch space, and ignores empty VM directories. It does not comprehensively check pack caches, image archives, credentials, shell configuration or checkpoints stored elsewhere. If smolvm is unavailable, its machine-list check is skipped and the remaining checks can still produce clean.

Code inspection indicates that the documented HOME boundary can weaken when profiles share an installation prefix. Both process scanners can accept executable-prefix matches; the macOS _boot-vm branch does not require its configuration path to belong to the audited HOME. Such configurations can include another profile's processes in a scan or reap.

Process and filesystem discovery suppress some access errors. --protected checks modification times under nominated directories; it does not establish that no reads occurred or that nothing outside those directories changed. These checks do not provide comprehensive isolation evidence.

cleanup.sh does not accumulate deletion and termination failures into a final failure result. It can report machines=remaining without a failing exit status. Operators must inspect its output and use the separate verifier. Its tracking file also does not authenticate ownership: recorded names, naming prefixes and branch relationships need review.

Windows guidance affects the user's shared state tree, and its narrowed exact-executable process-kill expression is explicitly unrun. Kubernetes guidance includes privileged system removal and optional k3s removal; its newer installation-script details were read from source without being exercised on a node.

Reasoning

The resource's design follows a useful distinction between registered machines, live processes and stored data. The project documents historical cases where detached VM children survived without appearing in machine listings, and cases where normal shared storage produced false leak reports. Combining separate observations addresses both problems.

Version distinctions matter. The documentation reports improved CLI-interruption cleanup from v1.20.2, while killed wrappers and Windows detached children have different behavior. It also describes delayed retirement of temporary entries and changes to scripted delete confirmation. These observations support keeping the bounded wait and explicit deletion flags, with compatibility assessed for the actual platform and release.

Alternatives

For a known machine, the references describe explicit stop and delete commands as a narrower manual option. Paused machines can refuse stop, and branched machines require attention to cascade deletion. Registry commands alone do not cover every historical detached-process case.

For storage reclamation, machine prune and pack prune address specific caches. machine prune can start a stopped machine. Full uninstall removes installation and main state directories, but the documentation identifies retained credentials, shell PATH configuration, version-specific cache leftovers and independently stored checkpoints. No external cleanup product is documented sufficiently for comparison.

Evidence

The supplied snapshot contains all nine files in the selected folder and two repository-level license notices at revision 9890e8a28b06a03270de95488122535ba690210b. Its capture timestamp is 2026-11-16T08:51:11.801Z, with recorded content checksum 12a98491d27a182f97f3dc0144279ceefedd7978e52ecd22734f444d84316eec.

The scripts establish visible implementation details; SKILL.md and the references supply dated project reports of runtime behavior and failures. Those reported outcomes have not been independently reproduced here. Linked installers, runtime implementations and other referenced repository files are outside the supplied contents.

The documentation explicitly retains unsuccessful cases and coverage gaps, including failed boots, surviving wrapper-launched processes, retained archives, unexercised mount cleanup and incomplete platform rechecks. These limits prevent treating its examples as universal outcomes.

Access & freshness

Costs

The Apache-2.0 copyright grant is royalty-free. No service pricing, support charges or operating rates are specified, so total operating cost is unknown. No paid API call appears in the three supplied Bash helpers.

Storage can remain significant after machines are deleted. The documentation describes a macOS restore cache retaining up to 16 GiB by default from v1.22.0. The Windows reference reports historical sparse-file sizes, including a 92 GB apparent pack cache; apparent file size is not a measurement of physical storage consumed or a typical requirement.

Rights

The repository LICENSE supplies Apache License 2.0 terms, and THIRD-PARTY-NOTICES.md confirms that smolvm itself uses that license. It permits use, modification and redistribution subject to its conditions. Redistribution requires a license copy, preservation of applicable notices, prominent notices on modified files and any required NOTICE attribution. The license disclaims warranties and does not grant general trademark rights.

Runtime release bundles carry additional licenses: libkrun is Apache-2.0; libkrunfw is LGPL-2.1-only and bundles a GPL-2.0-only Linux kernel; the listed macOS graphics libraries use MIT or Apache-2.0. Those binaries are outside this folder. Redistributing runtime bundles would require separate attention to their notices and corresponding-source obligations.

Freshness

The latest full script verification reported in SKILL.md is macOS arm64 with smolvm v1.29.0 on 2026-10-15. Linux aarch64 retains a v1.18.2 verification stamp from 2026-09-24, with later v1.22.2 script checks and selected v1.23.0 checks described separately. preflight.sh's generic verified_version=1.29.0 label does not establish Linux verification on that release.

Windows manual teardown is reported for v1.22.2 on 2026-10-03, with the narrowed process-kill expression excluded from that execution claim. Linux x86_64 and Kubernetes evidence reaches back to v1.14.2; newer Kubernetes installation details were inspected at v1.22.2 without a node run. Compatibility beyond the documented versions is unknown.

Actions

Before adopting the skill, match its documented platform coverage to the installed release and review its path assumptions. Start with preflight.sh and the machine listing, then inspect recorded names and descendants before cleanup. Review reported process identities before using --reap, particularly when installations or profiles share executable paths.

After cleanup, interpret each verifier field alongside audited_home and scanned_prefix. Review retained restore caches separately because they can contain guest memory and disks. For complete removal, also account for external checkpoints, credentials, shell configuration and cache directories identified in the platform references.

Windows and Kubernetes require their dedicated procedures. Their documented scope and execution gaps warrant separate validation before relying on them for a shared workstation or node.

Evidence for this report

LICENSEnotice · checked 2026-11-16
THIRD-PARTY-NOTICES.mdnotice · checked 2026-11-16
docs/teardown/README.mdselected · checked 2026-11-16
docs/teardown/SKILL.mdselected · checked 2026-11-16
docs/teardown/references/kubernetes.mdselected · checked 2026-11-16
docs/teardown/references/locations.mdselected · checked 2026-11-16
docs/teardown/references/traps.mdselected · checked 2026-11-16
docs/teardown/references/windows.mdselected · checked 2026-11-16
docs/teardown/scripts/cleanup.shselected · checked 2026-11-16
docs/teardown/scripts/preflight.shselected · checked 2026-11-16
docs/teardown/scripts/verify-clean.shselected · checked 2026-11-16