clean-system-cache
Skill0 starsChanged 3 months agoMITView on GitHub
Cross-platform developer, designer, and browser cache cleaner for Windows, Linux, and macOS. Safely purges only unreferenced, dangling, and disposable caches from package managers (uv, npm, bun, pip, pnpm, yarn, cargo, go, dotnet, composer, gradle, brew), IDEs and compilers (xcode, android, vscode, cursor, cypress), containers (docker, podman), creative suites (adobe media cache, photoshop temp, figma, blender, electron), and web browsers (chrome, chromium, brave, edge, firefox, zen, vivaldi, safari). Enforces active running session protection and strict cache-only isolation with zero external runtimes (pure Bash on POSIX, native CMD on Windows).
In this repository47 other files it gives its agents.
- AGENTS.mdAGENTS.md
- llms.txtllms.txt
- accountsSkill
- analyticsSkill
- automationSkill
- brandSkill
- client-commsSkill
- contentSkill
- crmSkill
- databaseSkill
- designSkill
- devopsSkill
- growthSkill
- gtmSkill
- incident-responseSkill
- mobileSkill
- opsSkill
- paidadsSkill
- qa-launchSkill
- researchSkill
- retainSkill
- sales-enablementSkill
- seoSkill
- smmSkill
- telegramSkill
- webdevSkill
- context-anchorSkill
- coupling-routerSkill
- evidence-ledgerSkill
- relaySkill
- secretarySkill
- gitSkill
- new-projectSkill
- updateagentsSkill
- updatedocsSkill
- animateSkill
- designscopeSkill
- refactorSkill
- auditSkill
- code-reviewSkill
- dead-letterSkill
- gauntlet-loopSkill
- humanizeSkill
- muse-securitySkill
- puaSkill
- coachSkill
- periodic-retreatSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 53
Do NOT use this skill for:
- Distinctive: line 99
Before modifying disk contents, run an inspection to calculate reclaimable space across all installed tools:
- Distinctive: line 111
If you want to target specific subsystems (e.g.
- Very specific: line 153
Never Prune Active Docker Images or Named Volumes: Only prune dangling build layers (docker builder prune -f), never containers or database …
- Distinctive: line 159
Before marking cleanup complete, verify:
- Distinctive: line 161
Only disposable cache directories were targeted.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
🧹 Clean System Cache — Cross-Platform Developer, Designer & Browser Cache Cleaner
Aliases:
clean-cache|purge-cache|cache-cleaner|disk-cleanup
Safely reclaim tens of gigabytes of disk space by purging only unreferenced, dangling, and disposable caches produced by installed developer, designer, and web browser toolchains across Windows, Linux, and macOS.
Requires zero external runtimes (no Python, no Node, no dependencies):
- Linux & macOS: Pure Bash / POSIX (
scripts/clean-cache.sh) - Windows: Native Command Prompt batch script (
scripts/clean-cache.cmd)
When to Use
Trigger Conditions
Execute this skill when:
- Low Disk Space Warnings: Disk capacity drops below comfortable working thresholds due to accumulated build layers, package archives, or scratch media files.
- Dangling Build Layers: Docker BuildKit layers, Xcode DerivedData, Android build-cache, or Go/Cargo build artifacts consume tens of gigabytes without active references.
- Bloated Web Browser Caches: Google Chrome, Mozilla Firefox, Zen, Brave, or Microsoft Edge disk caches grow to multiple gigabytes of stale HTTP responses.
- Stale Designer Scratch Files: Adobe Premiere, After Effects, Audition (
.cfa/.pekaudio peak caches), or Figma desktop app caches lock up storage. - Dormant
node_modulesDirectories: Old, abandoned repository folders hog dozens of gigabytes across user project directories.
Anti-Triggers
Do NOT use this skill for:
- Wiping active project code, git histories, or working repository files.
- Cleaning browser cookies, logins, saved passwords, bookmarks, or user profiles (the skill strictly protects them).
- Purging virtual environments (
.venv) or active Docker containers and volumes. - Deleting global binary installations (
~/.cargo/bin,~/.nvm, etc.).
Quick Reference
11-Point Cache Architecture Matrix
┌─────────────────────────┬────────────────────────────────────────────────────────┐
│ Suite / Category │ Targeted Cache Layers (Disposable Only) │
├─────────────────────────┼────────────────────────────────────────────────────────┤
│ 1. Package Managers │ uv, npm (_npx, _logs), bun, pip, pnpm store, cargo, go │
│ 2. Language Ecosystems │ dotnet (NuGet locals), composer, gradle, brew cleanup │
│ 3. Mobile & Apple │ Xcode DerivedData (macOS), Android build-cache │
│ 4. IDE Workspace Caches │ VS Code & Cursor stale workspaceStorage audits │
│ 5. Testing Frameworks │ Cypress browser binary download cache │
│ 6. Containers │ Docker BuildKit layers (prune -f), Podman build-cache │
│ 7. Creative Media │ Adobe Media Cache (.cfa, .pek), Photoshop temp files │
│ 8. Design Applications │ Figma desktop asset cache, Blender shader/preview cache│
│ 9. App Frameworks │ Electron prebuilt binary download caches │
│ 10. Web Browsers │ Chrome, Firefox, Zen, Brave, Edge, Vivaldi, Safari │
│ 11. Project Audits │ Dormant node_modules scanner across project trees │
└─────────────────────────┴────────────────────────────────────────────────────────┘Safety & Running Session Protection Contracts
| Protected Area | Skill Invariant |
| Active Browser Sessions & Live Tabs | PROTECTED. Process detection checks if any browser is running (pgrep / tasklist). Active sessions are skipped in execution mode so running tabs and websockets are never disrupted. |
| Browser Cookies, Passwords & History | NEVER TOUCHED. Purges purely disposable HTTP cache (Cache_Data, cache2/entries). User profiles, cookies, logins, and bookmarks remain 100% intact. |
| Project Repositories & Source Code | NEVER TOUCHED. Does not alter active git working directories or files. |
Virtual Environments (.venv) | PRESERVED. Cleans package download wheels only; never touches virtual environments. |
| Active Containers & Volumes | PRESERVED. Prunes dangling build layers only; active containers, images, and volumes are untouched. |
| Installed Global Binaries | PRESERVED. Binaries in ~/.cargo/bin, ~/.nvm, %APPDATA%, etc. are never touched. |
Procedure
Phase 1: Pre-Flight Inspection (Dry Run)
Before modifying disk contents, run an inspection to calculate reclaimable space across all installed tools:
- Linux & macOS:
clean-system-cache/scripts/clean-cache.sh --dry-run - Windows CMD:
clean-system-cache\scripts\clean-cache.cmd /dry-run
Phase 2: Targeted or Selective Purging
If you want to target specific subsystems (e.g. only web browsers or package managers):
- Web Browsers Only:
clean-system-cache/scripts/clean-cache.sh --tool browser - Specific Tools:
clean-system-cache/scripts/clean-cache.sh --tool uv,npm,firefox,zen,docker,adobe
Phase 3: Comprehensive Cache Execution
Execute full cleanup across all installed tools. Any tool not present on the system is dynamically and silently skipped:
- Linux & macOS:
clean-system-cache/scripts/clean-cache.sh - Windows CMD:
clean-system-cache\scripts\clean-cache.cmd
Phase 4: Dormant node_modules Audit
Scan project directories for abandoned node_modules folders consuming massive disk space:
- Linux & macOS:
clean-system-cache/scripts/clean-cache.sh --scan-node-modules ~/Projects - Windows CMD:
clean-system-cache\scripts\clean-cache.cmd /scan-node-modules C:\Projects
Pitfalls
- Never Clean Caches of Actively Running Browsers: Attempting to purge active browser files can crash open tabs or corrupt SQLite index databases. The script automatically guards against this by checking running processes.
- Never Touch Profile Directories: Cookies, sessions, bookmarks, and passwords live in
~/.mozilla,~/.config,%APPDATA%, and~/Library/Application Support/. Never delete these directories. - Never Assume Python or External Interpreters: Developer machines may have corrupted Python or node runtimes; cache cleaners must run on native shell (
bashon POSIX,cmdon Windows). - Never Prune Active Docker Images or Named Volumes: Only prune dangling build layers (
docker builder prune -f), never containers or database volumes.
Verification
Before marking cleanup complete, verify:
clean-cache.sh --dry-runorclean-cache.cmd /dry-runexecutes without errors.- Only disposable cache directories were targeted.
- Active browser sessions were protected and skipped if running.
- User cookies, credentials, and repository code remain 100% intact.
- Disk free space increased as reported by
df -hordir.
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.

