cleanup-cache
Clean system caches (npm, Homebrew, Yarn, browsers, Python/ML) to free disk space
Install / Use
npx skills add davila7/claude-code-templatesInstalls into whichever agent you are using.
Claude Commands
Claude Code slash commands
Quality Score
Category
OperationsSupported Platforms
Our assessment of cleanup-cache
cleanup-cache scores 92/100 on our quality scale, 201st of 745 Operations skills we index (top 27%).
Its Claude Commands is 4.9 KB long, well organised into 27 sections with 4 code examples: a solid amount of guidance for an agent.
With 33,517 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 2 days ago, so cleanup-cache is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-11-15. Automated pattern scan on 2026-11-15. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
cleanup-cache compared with similar skills
All 4 of these similar skills score higher than cleanup-cache; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| cleanup-cache (this skill)by davila7 | 92 | 33.5k | 2d ago | Claude Commands |
| claude-memby thedotmack | 100 | 117.6k | today | CLAUDE.md |
| taste-skillby Leonxlnx | 100 | 116.8k | 8d ago | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 112.3k | 8d ago | CLAUDE.md |
| Understand-Anythingby Egonex-AI | 100 | 92.8k | 1d ago | CLAUDE.md |
Frequently asked questions
- How do I install cleanup-cache?
- Run
npx skills add davila7/claude-code-templates. The install tabs above show the steps for each supported agent. - Which AI agents does cleanup-cache work with?
- It is written for Claude Code, as a Claude Commands file. Other agents that read the same format can often use it too.
- Is cleanup-cache safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is cleanup-cache still maintained?
- The repository was last updated 2 days ago, so cleanup-cache is actively maintained.
Skill content
View source on GitHuballowed-tools: Bash(df:), Bash(du:), Bash(npm cache clean:), Bash(brew cleanup:), Bash(rm:), Bash(find:), Bash(docker system prune:*) argument-hint: [--aggressive] | [--maximum] description: Clean system caches (npm, Homebrew, Yarn, browsers, Python/ML) to free disk space
System Cache Cleanup
Clean temporary files and caches to free disk space: $ARGUMENTS
Current Disk Usage
- Disk space: !
df -h / | tail -1 - npm cache: !
du -sh ~/.npm 2>/dev/null || echo "Not found" - Yarn cache: !
du -sh ~/Library/Caches/Yarn 2>/dev/null || echo "Not found" - Homebrew cache: !
brew cleanup -n 2>/dev/null | head -5 || echo "Homebrew not installed"
Cleanup Options
Based on the arguments provided, execute the appropriate cleanup level:
Option 1: Conservative Cleanup (default)
Safe cleanup of package manager caches that can be easily rebuilt:
# Record starting disk space
echo "Starting cleanup..."
df -h / | tail -1 | awk '{print "Before: " $4 " free"}'
# Clean npm cache
echo "Cleaning npm cache..."
npm cache clean --force
# Clean Homebrew
echo "Cleaning Homebrew..."
brew cleanup
# Clean Yarn cache
echo "Cleaning Yarn cache..."
rm -rf ~/Library/Caches/Yarn
# Show results
df -h / | tail -1 | awk '{print "After: " $4 " free"}'
Option 2: Aggressive Cleanup (--aggressive flag)
Includes all conservative cleanup plus browser and development tool caches:
# Run conservative cleanup first (from Option 1)
npm cache clean --force
brew cleanup
rm -rf ~/Library/Caches/Yarn
# Clean browser caches
echo "Cleaning browser caches..."
rm -rf ~/Library/Caches/Google
rm -rf ~/Library/Caches/com.operasoftware.Opera
rm -rf ~/Library/Caches/Firefox
rm -rf ~/Library/Caches/Mozilla
rm -rf ~/Library/Caches/zen
rm -rf ~/Library/Caches/Arc
# Clean development tool caches
echo "Cleaning development caches..."
rm -rf ~/Library/Caches/JetBrains
rm -rf ~/Library/Caches/pnpm
rm -rf ~/.cache/puppeteer
rm -rf ~/.cache/selenium
# Clean Python/ML caches
echo "Cleaning Python/ML caches..."
rm -rf ~/.cache/uv
rm -rf ~/.cache/huggingface
rm -rf ~/.cache/torch
rm -rf ~/.cache/whisper
# Show results
df -h / | tail -1 | awk '{print "After aggressive cleanup: " $4 " free"}'
Option 3: Maximum Cleanup (--maximum flag)
Includes all aggressive cleanup plus Docker and old node_modules:
# Run aggressive cleanup first (from Option 2)
npm cache clean --force
brew cleanup
rm -rf ~/Library/Caches/Yarn
rm -rf ~/Library/Caches/{Google,com.operasoftware.Opera,Firefox,Mozilla,zen,Arc,JetBrains,pnpm}
rm -rf ~/.cache/{puppeteer,selenium,uv,huggingface,torch,whisper}
# Clean Docker (if installed)
echo "Cleaning Docker..."
docker system prune -af --volumes 2>/dev/null || echo "Docker not running or not installed"
# List node_modules directories for manual review
echo "Finding node_modules directories..."
echo "Note: Not auto-deleting. Review and delete manually if needed."
find ~ -name "node_modules" -type d -prune 2>/dev/null | head -20
# Show results
df -h / | tail -1 | awk '{print "After maximum cleanup: " $4 " free"}'
Execution Steps
-
Determine Cleanup Level
- No arguments or empty: Run Conservative Cleanup (Option 1)
--aggressive: Run Aggressive Cleanup (Option 2)--maximum: Run Maximum Cleanup (Option 3)
-
Safety Checks
- Verify sufficient permissions
- Ensure critical applications are closed (browsers for Option 2+)
- Warn about Docker containers being removed (Option 3)
-
Execute Cleanup
- Run appropriate commands based on the selected option
- Show progress for each cleanup step
- Handle errors gracefully (missing directories, permissions)
-
Report Results
- Display disk space before and after
- Show amount of space recovered
- List what was cleaned
- Provide recommendations if more space is needed
Important Notes
Conservative Cleanup (default):
- ✅ Always safe to run
- ✅ Caches rebuild automatically when needed
- ✅ No application impact
Aggressive Cleanup (--aggressive):
- ⚠️ Close browsers before running
- ⚠️ Browser caches will rebuild on next use
- ⚠️ ML models will re-download if needed
Maximum Cleanup (--maximum):
- ⚠️ Stops and removes all Docker containers/images
- ⚠️ Only deletes node_modules after manual review
- ⚠️ Most impactful but recovers the most space
Recovery
All cleaned caches are temporary and will rebuild automatically:
- npm/Yarn: Rebuilds on next
npm install - Homebrew: Downloaded on next
brew install - Browsers: Rebuilds on next browsing session
- Python/ML: Re-downloads models on next use
- Docker: Pull images again with
docker pull
Example Usage
# Conservative cleanup (default)
/cleanup-cache
# Aggressive cleanup
/cleanup-cache --aggressive
# Maximum cleanup
/cleanup-cache --maximum
After cleanup, verify the results and inform the user of:
- Space freed
- Current free space
- What was cleaned
- Whether additional cleanup is recommended
Related Skills
claude-mem
117.6kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
taste-skill
116.8kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
Agent-Reach
112.3kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Understand-Anything
92.8kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
