/disk-cleanup:disk-cleanup [scope | help — e.g. docker, xcode, node, apps, all; 'help' lists all scopes]from disk-cleanup
Multi-step macOS disk-space cleanup that runs identify → propose → execute. Manual-only: invoke explicitly via /disk-cleanup. Frees space without losing data — covers caches, dev tooling (Docker, Node/nvm, Xcode & iOS simulators, Android SDK, Gradle, package managers), VMs, Ollama models, orphaned data from uninstalled apps, and full app uninstalls. Categorizes every candidate by safety tier, confirms anything that isn't pure cache, and thins Time Machine local snapshots last so the freed space is actually realized.
Ships in disk-cleanup. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Free up disk space in three phases — Identify → Propose → Execute — without losing anything that matters. The whole point of this skill is to be aggressive about regenerable junk and careful about real data. Never delete in bulk; categorize first, confirm anything that isn't pure cache, and finish by realizing the space (snapshots — see Phase 3).
$ARGUMENTS selects what to clean. With no argument, run the full all flow. If the argument is
help, list, scopes, ?, or --help, print this table and stop — do not scan:
| Scope | Cleans |
|---|---|
all (default) | everything below — full identify → propose → execute |
caches | ~/Library/Caches, ~/.cache, package-manager caches |
docker | unused images, build cache, dangling volumes |
node | nvm Node versions + npm / yarn / bun caches |
xcode | DerivedData, iOS DeviceSupport, simulators, old runtimes |
android | SDK (NDK / system-images / build-tools), AVDs, Gradle caches |
ollama | local LLM models |
jetbrains | old per-version IDE config + caches |
vms | Parallels / VirtualBox / Vagrant |
apps | biggest apps, orphaned app data, full uninstalls |
snapshots | thin Time Machine local snapshots (realize freed space) |
For a named scope, run the identify pass for just that area, then propose and execute scoped to it. For an unrecognized argument, show this table and ask which they meant rather than guessing.
df /. / is the sealed read-only system volume and always looks
~full/empty. The number that matters is the Data volume: df -h /System/Volumes/Data.scripts/thin-snapshots.sh) and re-measure. This is usually the single biggest win.rm. brew cleanup, docker system prune, npm cache clean,
uv cache clean, xcrun simctl delete, ollama rm — they remove the right things and keep their
own bookkeeping consistent. Raw rm is the fallback, not the default.Run the scan scripts. They make no changes.
bash scripts/scan.sh # real free space, snapshot count, home + known targets, big apps
bash scripts/find-orphan-app-data.sh # ~/Library data for apps that are no longer installed
Then drill into whatever's big and ambiguous with du -shx <dir> / du -hx -d 1 <dir> | sort -rh.
For multi-GB items you don't recognize, look inside before proposing deletion (principle 3).
Reach for references/cleanup-targets.md — a catalog of every common target with its location, safety
tier, the exact cleaner command, and what re-downloading/rebuilding costs. Use it to interpret the scan
and to copy the right command in Phase 3.
Group findings into safety tiers and present a compact table (size · what it is · tier · recovery cost).
AskUserQuestion with clear options (orphaned-only / latest-kept / everything).Rules for proposing:
.nvmrc files; before pruning NDK/build-tools check what projects pin; keep the
default and the newest of each major line.mdfind -name "<App>.app" before deleting — names don't always map cleanly.Run the approved deletions, preferring the native cleaner for each target (full command list in
references/cleanup-targets.md). A few that matter:
brew cleanup -s # Homebrew downloads
npm cache clean --force && rm -rf ~/.npm/_npx # npm cache + npx installs
uv cache clean; yarn cache clean # uv / Yarn
docker system prune -a -f && docker volume prune -a -f # images+cache, THEN named volumes (Tier 2 — confirm)
xcrun simctl delete unavailable # simulators for runtimes you no longer have
xcrun simctl runtime delete <id> # old iOS runtimes (keep the current one)
ollama rm <model> # specific local LLM models
Then the parts with walls and the finale:
Version stacks (Node, JetBrains per-version config, NDK, iOS runtimes): delete all but the current + latest you confirmed keeping.
Permission walls — explain and hand off rather than fight them:
/Applications → the user runs sudo rm -rf "/Applications/<App>.app"
(suggest they paste it with a leading ! so it runs in-session).~/Library/Containers/* are TCC-protected → even sudo fails without Full Disk Access on
the terminal. Offer Finder (drag to Trash — has the entitlement) or granting FDA then re-running
(FDA only applies after the terminal is fully quit and reopened).THE FINALE — realize the space. After deletions, thin local snapshots and re-measure:
bash scripts/thin-snapshots.sh
Report before/after free space on the Data volume. If it didn't move as expected, investigate (lingering snapshots, a background download like a media/cloud sync) — don't claim a win you can't see.
For a complete, end-to-end app uninstall (e.g. Microsoft Office) including system daemons/helpers and
the FDA-gated containers, see the "Full app uninstall" section of references/cleanup-targets.md.
com.apple.* system folders, the Office shared containers while other MS apps remain,
or ~/Library/Containers/com.microsoft.VSCode-style data for apps the user is keeping.bash (the bundled scripts already do).commit.gpgsign-style settings to "make deletion easier."What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub rvanbaalen/skills --plugin disk-cleanup