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
by@camopel
MIT-0
Security Scan
OpenClaw
Suspicious
medium confidencePurpose & 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 ziplatest
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-runshows 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
| Target | Typical Size | Notes |
|---|---|---|
| Trash | 1–50 GB | macOS ~/.Trash, Linux ~/.local/share/Trash |
Stale /tmp | 1–10 GB | pip/npm/rust build dirs older than 60 min |
| pip cache | 50–500 MB | pip cache purge |
| Go build cache | 100 MB–2 GB | go clean -cache |
| pnpm / yarn / node caches | 50–500 MB | Safe to regenerate |
| JetBrains IDE cache | 1–10 GB | IntelliJ, PyCharm, WebStorm, etc. |
| Whisper model cache | 1–5 GB | Redownloads on demand |
| Chrome / Firefox cache | 200 MB–2 GB | Browsing cache only |
| Playwright browsers | 200 MB–1 GB | Redownloads on demand |
| Docker dangling images | 0–10 GB | Only unreferenced images + build cache |
Linux Only
| Target | Typical Size | Notes |
|---|---|---|
| Apt cache | 200 MB–2 GB | apt clean |
| Journal logs | 500 MB–4 GB | Vacuumed to 200 MB |
| Disabled snap revisions | 500 MB–5 GB | Old versions kept by snapd |
| Old kernels | 200–800 MB | Keeps current running kernel |
macOS Only
| Target | Typical Size | Notes |
|---|---|---|
| Homebrew old versions | 500 MB–5 GB | brew cleanup --prune=7 |
| Xcode DerivedData | 2–30 GB | Build artifacts, safe to clear |
| Xcode Archives | 1–20 GB | Old build archives |
| iOS DeviceSupport | 2–15 GB | Old device symbols |
| CoreSimulator caches | 500 MB–5 GB | Simulator disk images |
| Old user logs | 100 MB–1 GB | Logs older than 30 days |
Options
| Flag | Effect |
|---|---|
--dry-run | Preview cleanup without deleting anything |
--yes / -y | Run without confirmation prompts |
--skip-kernels | Don't remove old kernels (Linux) |
--skip-snap | Don't remove disabled snap revisions (Linux) |
--skip-docker | Don't prune Docker |
--skip-brew | Don't clean Homebrew |
Manual Extras
Targets the script doesn't touch (check manually if needed):
- Ollama models:
ollama list→ollama rm <unused> - npm global cache:
npm cache clean --force - Conda envs:
conda env list→conda 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 totalSelect a file
Select a file to preview.
Comments
Loading comments…
