disk-cleanup
Skill0 starsChanged 55 days agoMITView on GitHub
Analyze disk usage and clean package and container caches on an Arch Linux workstation. Use when the user mentions disk space, storage, cleanup, or that a drive is full.
- Deletes or force-pushes
We split this skill into the rules it gives an agent
5 rules. 0 are common, 2 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Run these commands to build a usage picture.
- Very specific: line 46
Check for orphaned worktree Docker environments — containers/volumes from worktrees that no longer exist.
- Distinctive: line 58
All of these are safe — they clear caches that will be rebuilt on demand.
- Very specific: line 84
If your project scopes Docker resources per worktree, tear those down before removing the worktree — otherwise wtp remove leaves orphaned …
- Very specific: line 111
After cleanup, verify with df -h / and compare before/after.
“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/disk-cleanup
Analyze disk usage and clean package/container caches on an Arch Linux workstation.
Trigger: User mentions disk space, storage, cleanup, or "drive is full."
Analysis Phase
Run these commands to build a usage picture. Start broad, drill into the big items.
1. Overall State
df -h /2. Top-Level Scan
Measure /home/<user>/* and /home/<user>/.* (hidden dirs) separately:
du -sh /home/<user>/* 2>/dev/null > /tmp/du-home.txt
sort -rh /tmp/du-home.txt > /tmp/du-home-sorted.txt
du -sh /home/<user>/.* 2>/dev/null > /tmp/du-hidden.txt
sort -rh /tmp/du-hidden.txt > /tmp/du-hidden-sorted.txtThen read the sorted files. The usual suspects for hidden dirs:
~/.cache(yay, pip, uv, yarn, npm, Cypress, Playwright, puppeteer, huggingface, browsers)~/.local/share(Steam, vosk, waydroid, whisper models, flatpak)~/.npm,~/.gradle,~/.gem,~/.nvm,~/.rustup,~/.cargo
3. Docker
docker system df # Summary: images, containers, volumes, build cache
docker system df -v # Verbose: per-image and per-volume breakdownCheck for orphaned worktree Docker environments — containers/volumes from worktrees that no longer exist. Compare docker ps -a --format "{{.Names}}" against git worktree list.
4. System Caches
du -sh /var/cache/pacman 2>/dev/null # pacman package cache
du -sh /var/log 2>/dev/null # system logs
du -sh /opt 2>/dev/null # optional packages (DaVinci Resolve, etc.)Cleanup Commands (Safe)
All of these are safe — they clear caches that will be rebuilt on demand. No data loss risk.
Package Manager Caches
| Cache | Command | Notes |
| yay (AUR builds) | yay -Sc --noconfirm | Often the single biggest hog (100GB+). Clears build source + compiled packages. |
| pacman | paccache -r | Keeps last 3 versions. Use paccache -rk1 to keep only 1. |
| npm | npm cache clean --force | |
| yarn | yarn cache clean | |
| pip | pip cache purge | |
| uv | uv cache clean | |
| Go build | go clean -cache | |
| Gradle | rm -rf ~/.gradle/caches | Only if not actively building Android |
Docker
| What | Command | Notes |
| Dangling images | docker image prune -f | Images not tagged or referenced |
| All unused images | docker image prune -a -f | Images not used by any container. Will require rebuild next time. |
| Orphaned volumes | docker volume prune -f | Volumes not attached to any container |
| Full cleanup | docker system prune -a --volumes -f | Nuclear option: images + containers + volumes + networks |
Worktree Docker Cleanup
If your project scopes Docker resources per worktree, tear those down before removing the
worktree — otherwise wtp remove leaves orphaned containers and volumes behind:
cd /path/to/worktree
../../<project>/scripts/wtp-cleanup-env.shA per-worktree Docker Compose project is typically named <project>-wt-{ID}. Check your
project's cleanup script for the exact naming.
Known gap: wtp remove does not call any such script automatically. It must be run
manually before worktree removal.
Browser/Test Tool Caches
These are large and safe to clear, but will re-download on next use:
| Cache | Location | Clear command |
| Cypress | ~/.cache/Cypress | rm -rf ~/.cache/Cypress |
| Playwright | ~/.cache/ms-playwright | rm -rf ~/.cache/ms-playwright |
| Puppeteer | ~/.cache/puppeteer | rm -rf ~/.cache/puppeteer |
| Selenium | ~/.cache/selenium | rm -rf ~/.cache/selenium |
Verification
After cleanup, verify with df -h / and compare before/after.
What NOT to Clean Without Asking
~/Videos,~/Pictures,~/docs— personal media, operator decides~/.local/share/Steam— games, operator decides~/.local/share/vosk,~/.cache/huggingface— ML models, may be in active use/var/lib/docker— never rm directly, use Docker CLI- Any git repo or worktree directory
Other versions18 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 18
- glebis/claude-skills★ 404same name
- mtarcure/claude-vibe-squad★ 220same name
- MakiDevelop/claude-skills★ 3same name
- vndee/engineering-skills★ 3same name
- TsinHzl/claude-code-config★ 2same name
- CharlesLadera/claude-custom-skills★ 1same name
- foogunlana/skills★ 1same name
- galonge/free-claude-skills★ 1same name
- pabloleonalcaide/development-skills★ 1same name
- shell-nlp/skills★ 1same name
8 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use tdd.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
GoogleSkilltdd
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
Also in 3 projects that use this
In this repository43 other files it gives its agents.
- skills/technical/supabase-postgres-best-practices/AGENTS.mdAGENTS.md
- skills/technical/supabase-postgres-best-practices/CLAUDE.mdCLAUDE.md
- direct-handoffSkill
- handoffSkill
- nt-commsSkill
- threadsSkill
- meal-planningSkill
- resume-workflowSkill
- bash-scriptsSkill
- code-reviewSkill
- davinci-resolveSkill
- fastmcp-pythonSkill
- go-cliSkill
- markdown-to-pdfSkill
- pr-createSkill
- qa-planSkill
- rcaSkill
- react-native-best-practicesSkill
- ruby-railsSkill
- skill-creatorSkill
- spec-checkSkill
- supabase-migrationsSkill
- supabase-postgres-best-practicesSkill
- supabase-sqlSkill
- testingSkill
- ui-state-managementSkill
- waydroid-adbSkill
- calcinatioSkill
- citationsSkill
- exploreSkill
- manual-qaSkill
- nvim-copilotSkill
- orchestrateSkill
- orthogonal-emanationSkill
- product-intent-signal-extractionSkill
- project-management-signal-extractionSkill
- request-researchSkill
- researchSkill
- skill-discoverySkill
- slack-thread-triageSkill
- specSkill
- tmux-sidecarSkill
- youtube-transcribeSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

