Skip to content
Skills Library
Programming · Automation

clean-dev-caches

/clean-dev-caches

Free disk space on a developer machine by clearing regenerable caches (npm, Bun, Yarn, pnpm, Homebrew, pip, uv, Go, Gradle, CocoaPods, Xcode DerivedData, old Playwright/Puppeteer browsers, VS Code and JetBrains caches, Docker build cache), stale project build outputs (.next, .turbo, .nuxt, Rust target), and git worktrees whose work is already merged. Use when the user says their disk is full, asks to free up space, clear dev caches, clean build artifacts, or prune old worktrees. macOS first; most paths also work on Linux.

Licence
MIT
Last repository change
28.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
1
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 28.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • 1 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: scripts/devclean.sh

What it does and when to use it

Free disk space on a developer machine by clearing regenerable caches (npm, Bun, Yarn, pnpm, Homebrew, pip, uv, Go, Gradle, CocoaPods, Xcode DerivedData, old Playwright/Puppeteer browsers, VS Code and JetBrains caches, Docker build cache), stale project build outputs (.next, .turbo, .nuxt, Rust target), and git worktrees whose work is already merged. Use when the user says their disk is full, asks to free up space, clear dev caches, clean build artifacts, or prune old worktrees. macOS first; most paths also work on Linux.

Original author description

Free disk space on a developer machine by clearing regenerable caches (npm, Bun, Yarn, pnpm, Homebrew, pip, uv, Go, Gradle, CocoaPods, Xcode DerivedData, old Playwright/Puppeteer browsers, VS Code and JetBrains caches, Docker build cache), stale project build outputs (.next, .turbo, .nuxt, Rust target), and git worktrees whose work is already merged. Use when the user says their disk is full, asks to free up space, clear dev caches, clean build artifacts, or prune old worktrees. macOS first; most paths also work on Linux.

How it works

  1. Workflow
  2. Things to know
Original SKILL.md headings · 112 lines, 1,122 words
SKILL.md preview
---
name: clean-dev-caches
description: Free disk space on a developer machine by clearing regenerable caches (npm, Bun, Yarn, pnpm, Homebrew, pip, uv, Go, Gradle, CocoaPods, Xcode DerivedData, old Playwright/Puppeteer browsers, VS Code and JetBrains caches, Docker build cache), stale project build outputs (.next, .turbo, .nuxt, Rust target), and git worktrees whose work is already merged. Use when the user says their disk is full, asks to free up space, clear dev caches, clean build artifacts, or prune old worktrees. macOS first; most paths also work on Linux.
---

# Clean dev caches

Everything here is about deleting files, so the job is mostly judgment: delete only what
rebuilds itself, skip anything in use, and report what actually got freed.

The bundled script does the measuring and deleting. Run it with `bash`, not as a zsh snippet:
`scripts/devclean.sh` (relative to this skill's folder).

```bash
bash scripts/devclean.sh scan              # what can be freed; deletes nothing
bash scripts/devclean.sh clean --yes       # delete every "ready" cache in the default tier
bash scripts/devclean.sh clean --only npm,gradle --yes
bash scripts/devclean.sh scan --deep       # also Maven, Go modules, Cargo sources, NuGet
bash scripts/devclean.sh builds ~/projects # .next/.turbo/... under a folder (add --yes to delete)
bash scripts/devclean.sh builds ~/projects --older-than 30          # only outputs not rebuilt in 30 days
bash scripts/devclean.sh builds ~/projects --older-than 90 --node-modules   # + deps of idle projects
bash scripts/devclean.sh worktrees ~/projects/my-repo   # report only
bash scripts/devclean.sh suggest           # bigger wins beyond caches; report only
bash scripts/devclean.sh tools             # AI coding CLIs and global tools you stopped using; report only
bash scripts/devclean.sh list              # every cache id
```

If `devclean` is on PATH (installed by the repo's `install.sh` or Homebrew), it's the same
script, so `devclean scan` works too.

`clean` and `builds` are dry runs until `--yes` is passed.

## Workflow

1. **Measure.** Run `df -h ~` for the starting free space, then `devclean.sh scan`. Show the
   user the table: each row is a cache, its size, and `ready` or `skip` with the reason.
2. **Agree on scope.** If the user already asked you to clean, go ahead with the default
   tier. Otherwise list the big rows and ask. Always ask before `--deep` (those take a long
   time to download again) and before anything in the "Not touched" section.
3. **Clean.** `devclean.sh clean --yes`, or `--only id,id` to clean less. Rows marked `skip`
   are skipped on their own. Don't work around them by deleting the path yourself.
4. **Build outputs (optional).** Ask which folder holds their projects (common ones:
   `~/projects`, `~/code`, `~/dev`, `~/src`, `~/Developer`). Prefer
   `builds DIR --older-than 30`: deleting the `.next` of a project they work on today only
   makes the next dev start slow. Show the list, then re-run with `--yes`. Projects with any
   running process inside them are skipped. That covers dev servers, editors' terminals and
   other agents. `--node-modules` (only with `--older-than`) also removes the dependencies of
   projects where nothing changed for that many days. `bun install` or `npm install` brings
   them back.
5. **Worktrees (optional).** `worktrees REPO` labels each linked worktree:
   - `SAFE`: no uncommitted changes, and every commit is in the default branch (or its PR
     was merged and every commit is pushed).
   - `KEEP`: open PR, commits that exist only locally, or a process running in it.
   - `REVIEW`: uncommitted changes or unmerged commits. Look before you suggest anything.
     For uncommitted changes, check whether the default branch already has the same lines.

   Show the table and remove only what the user approves. Right before removing, re-check
   that nothing is running in that worktree, because agents and terminals start up all the
   time. Use `git worktree remove --force <path>` and keep the branches.
6. **Suggest the bigger wins.** `devclean.sh suggest [DIR...]` looks past caches:
   - installers and old large files in Downloads
   - idle `node_modules` and build outputs
   - unused Docker images
   - Colima, OrbStack and other VMs, and a second container runtime
   - Ollama, Hugging Face and LM Studio models
   - Android emulators, iOS DeviceSupport, Xcode Archives and extra Xcode versions
   - extra Node, Rust, Python and Java versions
   - Conda packages and orphaned Homebrew packages
   - big app caches, files over 1 GB, and Time Machine snapshots

   It deletes nothing. Each line is a size, what it is, and how to act. Pass these to the
   user as suggestions, biggest first, in plain words. Act on one only when they pick it,
   and use the command on its line. A VM disk or a model is someone's working environment,
   not junk. Never `colima delete`, `docker image prune -a` or `ollama rm` without a
   specific yes.
7. **Unused tools.** `devclean.sh tools [--older-than DAYS]` (default 60) has two parts.
   - **AI coding tools and model runners:** Claude Code, OpenCode, Codex, Gemini, Qwen,
     Kilo, Aider, Goose, Amp, Crush, Cursor, Windsurf, Droid, Copilot CLI, Cline, Auggie,
     Continue, Kiro, OpenHands, Plandex, Antigravity, Ollama and LM Studio. Each gets:
     - a verdict: `IN USE` (running now), `USED`, `UNUSED` (idle that many days) or
       `LEFTOVER` (uninstalled, but its data is still there)
     - its install size and data size
     - the exact uninstall command for how it was installed (brew, npm, bun, pnpm, app
       bundle or native binary), then how to remove its data
   - **Other global command-line tools idle that long:** Homebrew formulae you installed
     yourself (not dependencies), plus npm, Bun, pnpm, pipx, uv, `cargo install` and
     `go install` tools.

   "Last used" is the later of the command's last-run time (file access time) and when it
   last wrote sessions, logs or settings. Never run a tool to check it, because even
   `--version` resets that date. Data folders hold sessions, settings and logins, so
   suggest deleting them only together with the uninstall. Never touch the harness you are
   running in. Ask before each removal.
8. **Report.** Run `df -h ~` again and give the change in free space as the result. Also
   list what was skipped and why.

## Things to know

- **`du` overstates what deleting frees on APFS.** Package managers (Bun, pnpm, npm via
  clonefile) and copied worktrees share disk blocks. Removing a 1.7 GB worktree can free
  50 MB. Never promise a number from `du` alone. The `df` change after cleaning is the truth.
- **Never delete these without an explicit request for that item:** Docker images or
  volumes (volumes often hold local databases), Android AVDs, iOS DeviceSupport, Xcode
  Archives (shipped builds), simulator devices, browser profiles, `node_modules`, the
  Trash, or `~/Library/Caches` as a whole. Spotify and browser caches aren't dev caches.
- **Check that nothing uses it first.** The script skips Gradle while a daemon runs, Xcode,
  VS Code and JetBrains caches while those apps are open, package-manager caches during an
  install, and Docker when the daemon is down. If the user wants a skipped one cleaned,
  ask them to quit the app (or run `gradle --stop`) and scan again.
- **Shell traps the script avoids** (keep this in mind when running your own commands):
  zsh aborts the whole command on an unmatched glob such as `AndroidStudio*`. zsh expands a
  bare `=word` (`echo ====` fails). Some machines put a non-coreutils `head`/`du` early on
  PATH (XAMPP ships a perl `head`). Use `/usr/bin/head` or run under `bash`.
- After a big cache clean, the next `npm install`, `bun install`, Gradle build or Docker
  build is slower while it downloads again. Mention that once.
Files in this package (2)
  • SKILL.md 8 KB
  • scripts/devclean.sh 40 KB

Versions

The database has no other skills named clean-dev-caches.

Database snapshot: 13.11.2026 · package version 837fc92d94c9 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 1 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100cleanup
    Reclaim disk space and prune branches left behind by AI coding agents - merged or abandoned git worktrees, merged branches, stale build artifacts (node_modules, .venv, target), old archives and backups, package caches, and old agent session logs. Use when the user runs /cleanup,…
  • 98disk-cleanup
    Reclaim space on the Windows C: drive by clearing regenerable caches (npm, pip, temp, Windows Update, puppeteer, driver leftovers). Use when the system drive is low on space, when an installer needs room to extract, or when the user asks to free up / clean up disk space. Scans…
  • 100xcode-disk-cleanup
    Audit and safely clean Xcode-related developer storage on macOS. Use whenever a developer mentions low disk space, Xcode storage, DerivedData, simulator devices or runtimes, stale beta platforms in Xcode Settings, DeviceSupport, archives, dSYMs, CocoaPods caches, simulator dyld…
  • 100clean-targets
    Reclaim disk space by deleting cargo target/ build directories across the main checkout and every git worktree of this repo. Use whenever the user wants to clean up build artifacts, free disk space, run "cargo clean" everywhere, prune worktree build caches, or complains that the…
  • 90free-up-disk-space
    Free up disk space on the user's Mac safely with DiskSpace AI. Use when the user says their Mac or disk is full, asks what's taking up space, can't install a macOS update, wants to clean caches, Xcode DerivedData, simulators, Docker, node_modules or AI models, or asks whether a…
  • 86cleanup
    Free disk in a project by removing the git worktrees and Next.js cache folders nothing uses, keeping every worktree a session or process works in and every cache a running server holds. Use for /cleanup, \"clean up worktrees\", \"free disk space\", \"what's using my disk\",…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.