Getting started
Installation
Section titled “Installation”Run purgeit directly with npx:
npx purgeit ~/devOr install it globally:
npm install -g purgeitpurgeit ~/devFirst run
Section titled “First run”In a terminal, purgeit opens an interactive TUI:
purgeit ~/devEvery row starts unselected. Use the keyboard to navigate, select artifacts, and delete them after an explicit confirmation — see the Interactive TUI reference for the full keymap (also available in-app by pressing ?).
For a non-interactive dry-run preview, use headless mode:
purgeit --headless --dry-run ~/devOr emit JSON for downstream tools:
purgeit --json --dry-run ~/devWhat gets cleaned
Section titled “What gets cleaned”purgeit ships with 60+ built-in rules across 16 ecosystems — not just JavaScript. A sample:
- JavaScript/TypeScript:
node_modules,dist,.next,.nuxt,.turbo,.vite,coverage, and more - Python:
__pycache__,.venv,.tox,.pytest_cache,.mypy_cache,htmlcov, and more - Rust:
target,registry(Cargo’s~/.cargo/registry/crate cache — point purgeit at~/.cargoto reclaim it) - Go, PHP, Ruby, Elixir, Haskell, Elm, Zig, Dart/Flutter
- Apple:
DerivedData,.build(SPM),Pods(CocoaPods),Carthage - Java/JVM:
.gradle,target(Maven),.cxx(Android NDK) - .NET:
bin,obj(also covers Eclipse Java) - Gated directories — matched only when a sibling manifest proves they’re real generated output, e.g.
Pods/only next to aPodfile,vendor/only next to acomposer.json,go.mod,Cargo.toml, orGemfile
Every one of these is rendered live, with descriptions and gate conditions, on the built-in rules reference — generated directly from the same source the scan engine compiles against, so it can’t go stale. You can extend, narrow, or replace the ruleset with a configuration file.
Next steps
Section titled “Next steps”- Interactive TUI — full keymap and workflow for the default terminal experience
- CLI reference — every flag, exit codes, and headless/scripting examples
- Configuration — customize the ruleset with
purgeit.config.ts - API reference — use the scanner and rule engine as a library in your own tools