Safe, cross-platform developer disk cleanup — like
npkill, but for every stack.
clearstack is a single-binary Go tool that scans your dev machine for dormant build artifacts, caches, and package manager stores, and lets you reclaim disk space without breaking any active project.
Safe-by-default: dry-run first, trash-over-delete, whitelist protection, official commands (pnpm store prune, go clean -modcache, docker system prune) instead of raw rm -rf whenever possible.
Full-stack developers routinely sit on tens to hundreds of gigabytes of:
node_modules,.next,.turbo,.nuxt,.svelte-kit,.parcel-cache,.vite__pycache__,.pytest_cache,.mypy_cache,.ruff_cache, dormant.venvGOCACHE,GOMODCACHE- Rust
target/ - Gradle / Maven / NuGet local caches
- Xcode
DerivedData(often 30–100 GB), old simulators, archives - Docker dangling images, build cache, stopped containers
- npm / yarn / pnpm / bun global caches
Existing tools each cover one slice. clearstack covers them all with one interface.
- 🧹 Multi-stack — Node, Bun, Python, Go, Rust, Java, .NET, Docker, Xcode, and more.
- 🖥️ Cross-platform — macOS, Linux, Windows (single static binary, no CGO).
- 🎨 Interactive TUI — built on Charm's Bubble Tea, npkill-style navigation.
- 🧠 Smart dormancy — only touches projects idle for N days (configurable).
- 🛡️ Safety net — whitelist, dry-run default, trash-over-delete, operation journal, undo.
- ⚙️ Scriptable CLI —
scan,clean,analyze,doctor,undo,config, JSON output. - 🚀 Fast — parallel scan with
fastwalk, lazy size calculation.
# Homebrew (macOS, Linux)
brew install guilhermejansen/tap/clearstack
# Scoop (Windows)
scoop bucket add guilhermejansen https://github.com/guilhermejansen/scoop-bucket
scoop install clearstack
# Direct (any OS)
curl -fsSL https://raw.githubusercontent.com/guilhermejansen/clearstack/main/install.sh | bash
# Go developers
go install github.com/guilhermejansen/clearstack/cmd/clearstack@latest# Open the interactive TUI
clearstack
# Scan a directory without touching anything
clearstack scan ~/Developer --json
# Clean node_modules and .next in dormant projects (>14 days)
clearstack clean ~/Developer --categories=node_modules,.next --dry-run
# Once you trust the output, drop --dry-run
clearstack clean ~/Developer --categories=node_modules,.next --yes
# Diagnose what clearstack can clean on your system
clearstack doctor
# Undo the last operation
clearstack undo --last 1- First run is always a dry-run.
- Whitelisted paths (
/,/System,~, etc.) can never be deleted. - Symlinks are never followed.
pnpm storealways usespnpm store prune— never raw deletion.GOMODCACHE/GOCACHEalways usego clean -modcache/-cache.- Every operation is logged to
~/.local/state/clearstack/operations.jsonland reversible viaclearstack undo. - Trash is the default strategy;
--hardopts into real deletion.
Read docs/SAFETY.md for the full safety model.
docs/INSTALL.md— per-platform install instructionsdocs/CATEGORIES.md— every category, paths, safety leveldocs/CONFIG.md— config file referencedocs/SAFETY.md— safety model & guaranteesdocs/DEVELOPMENT.md— contributing
🚧 Early development. See CHANGELOG.md for progress.
MIT © Guilherme Jansen / Setup Automatizado