storage-cleanup

One-command disk cleanup for macOS and Linux — trash, caches, temp files, old kernels, snap revisions, Homebrew, Docker, and Xcode artifacts. Use when user asks to free storage, clean up disk, reclaim space, reduce disk usage, or encounters low disk / "disk full" warnings. Safe by default with dry-run mode. No dependencies beyond bash and awk.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "storage-cleanup" with this command: npx skills add camopel/storage-cleanup

Storage Cleanup

Reclaim tens of gigabytes in one command. No config files, no dependencies, no damage.

Why This Skill

Systems accumulate junk silently — IDE caches, old snap revisions, stale pip builds, forgotten trash, outdated kernels. Manually hunting them down wastes time and risks deleting the wrong thing.

This skill:

  • Scans 12+ cleanup targets across both macOS and Linux in a single pass
  • Safe by default--dry-run shows exactly what would be cleaned before touching anything
  • Zero dependencies — pure bash + awk, works on any stock macOS or Linux install
  • Cross-platform — auto-detects OS and runs only what applies (no errors on missing tools)
  • Selective — skip any category with --skip-kernels, --skip-docker, --skip-brew, --skip-snap
  • Reports savings — shows before/after disk usage and exact bytes freed

Quick Start

# Preview what would be cleaned (safe, changes nothing)
bash scripts/cleanup.sh --dry-run

# Clean everything
bash scripts/cleanup.sh --yes

# Clean but keep Docker and old kernels
bash scripts/cleanup.sh --yes --skip-docker --skip-kernels

What Gets Cleaned

Both Platforms

TargetTypical SizeNotes
Trash1–50 GBmacOS ~/.Trash, Linux ~/.local/share/Trash
Stale /tmp1–10 GBpip/npm/rust build dirs older than 60 min
pip cache50–500 MBpip cache purge
Go build cache100 MB–2 GBgo clean -cache
pnpm / yarn / node caches50–500 MBSafe to regenerate
JetBrains IDE cache1–10 GBIntelliJ, PyCharm, WebStorm, etc.
Whisper model cache1–5 GBRedownloads on demand
Chrome / Firefox cache200 MB–2 GBBrowsing cache only
Playwright browsers200 MB–1 GBRedownloads on demand
Docker dangling images0–10 GBOnly unreferenced images + build cache

Linux Only

TargetTypical SizeNotes
Apt cache200 MB–2 GBapt clean
Journal logs500 MB–4 GBVacuumed to 200 MB
Disabled snap revisions500 MB–5 GBOld versions kept by snapd
Old kernels200–800 MBKeeps current running kernel

macOS Only

TargetTypical SizeNotes
Homebrew old versions500 MB–5 GBbrew cleanup --prune=7
Xcode DerivedData2–30 GBBuild artifacts, safe to clear
Xcode Archives1–20 GBOld build archives
iOS DeviceSupport2–15 GBOld device symbols
CoreSimulator caches500 MB–5 GBSimulator disk images
Old user logs100 MB–1 GBLogs older than 30 days

Options

FlagEffect
--dry-runPreview cleanup without deleting anything
--yes / -yRun without confirmation prompts
--skip-kernelsDon't remove old kernels (Linux)
--skip-snapDon't remove disabled snap revisions (Linux)
--skip-dockerDon't prune Docker
--skip-brewDon't clean Homebrew

Manual Extras

Targets the script doesn't touch (check manually if needed):

  • Ollama models: ollama listollama rm <unused>
  • npm global cache: npm cache clean --force
  • Conda envs: conda env listconda remove -n <env> --all
  • Compressed logs: sudo find /var/log -name "*.gz" -delete
  • Flatpak (Linux): flatpak uninstall --unused
  • Time Machine snapshots (macOS): tmutil listlocalsnapshots /tmutil deletelocalsnapshots <date>

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

Deno A Secure Runtime For Javascript And Typescript

Deno integration. Manage data, records, and automate workflows. Use when the user wants to interact with Deno data.

Registry SourceRecently Updated
Coding

Dialmycalls

DialMyCalls integration. Manage Accounts, Contacts, Recordings, Shortcodes, Keywords, Broadcasts. Use when the user wants to interact with DialMyCalls data.

Registry SourceRecently Updated
Coding

Agentskill

Analyze a code repository and synthesize an AGENTS.md.

Registry SourceRecently Updated
Coding

Credit Repair Cloud

Credit Repair Cloud integration. Manage Users, Clients, Affiliates, Providers, Disputes, Products and more. Use when the user wants to interact with Credit R...

Registry SourceRecently Updated
1700Profile unavailable