Skip to content

Getting started

Run purgeit directly with npx:

Terminal window
npx purgeit ~/dev

Or install it globally:

Terminal window
npm install -g purgeit
purgeit ~/dev

In a terminal, purgeit opens an interactive TUI:

Terminal window
purgeit ~/dev

Every 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:

Terminal window
purgeit --headless --dry-run ~/dev

Or emit JSON for downstream tools:

Terminal window
purgeit --json --dry-run ~/dev

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 ~/.cargo to 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 a Podfile, vendor/ only next to a composer.json, go.mod, Cargo.toml, or Gemfile

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.

  • 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