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 a...

MIT-0 · Free to use, modify, and redistribute. No attribution required.
0 · 248 · 1 current installs · 1 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Suspicious
medium confidence
Purpose & Capability
The name, description, SKILL.md and the visible portion of scripts/cleanup.sh align: they scan and remove trash, caches, temp files, package manager caches, journal logs, snap revisions, Homebrew/Xcode artifacts, Docker, etc. The targets the skill touches are consistent with a disk-cleanup utility.
Instruction Scope
SKILL.md instructs users to run the included shell script and documents dry-run and skip flags. The script performs many file-system and package-manager operations (rm -rf, apt clean, brew cleanup, journalctl vacuum, snap remove, sudo find -delete, Docker prunes, etc.). That behavior is in-scope for a cleanup tool, but it's inherently destructive and requires careful review before use. SKILL.md claims 'no dependencies beyond bash and awk' — the script conditionally invokes many external tools (pip, go, brew, apt, snap, docker, journalctl) but checks for their presence; this is reasonable but the claim may be misleading to less-technical users.
Install Mechanism
No install spec — instruction-only with an included script. Nothing is being downloaded or installed by the skill itself, which limits supply-chain risk.
Credentials
No environment variables or external credentials are requested. However, the script invokes sudo for many actions on Linux and runs privileged package-manager and file-deletion commands. Requesting elevated privileges is proportionate to cleaning system-level caches, but it increases risk and requires user caution.
Persistence & Privilege
The skill is not marked always:true and does not request persistent system-wide configuration. It does not declare autonomous-execution restrictions (default behavior), which is expected for skills. There is no evidence it modifies other skills or agent configuration.
What to consider before installing
This skill appears to be a legitimate disk-cleanup utility, but it performs many destructive operations and needs sudo for system-level cleanup. Before installing or running it: 1) Don't run with --yes initially — always run bash scripts/cleanup.sh --dry-run and inspect the results. 2) Review the full scripts/cleanup.sh file yourself (the provided manifest/content was truncated in the review, so confirm the missing tail of the script before trusting it). 3) Back up important data or test in a disposable VM/container first. 4) Pay attention to where it uses sudo and which paths it deletes (ensure no unexpected empty variables or path expansions). 5) If you lack confidence reading shell scripts, ask a knowledgeable admin to audit the complete script. If you want, provide the full, untruncated cleanup.sh so I can re-evaluate with higher confidence.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.0
Download zip
latestvk9700p1x2jmq909wkm57vkdha582bmsb

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

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>

Files

2 total
Select a file
Select a file to preview.

Comments

Loading comments…