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

Use the keyboard to navigate, select artifacts, and delete them after confirming.

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

By default, purgeit matches the most common regenerable directories:

  • node_modules, dist, .next, .nuxt, out, target
  • Framework caches: .cache, .vite, .turbo, .swc, .angular, .svelte-kit, .astro
  • Test artifacts: coverage, .nyc_output, playwright-report, test-results
  • Python artifacts: __pycache__, .venv, .tox, .pytest_cache, .mypy_cache, .ruff_cache
  • Gated directories (only when a sibling manifest exists): Pods, build, .gradle, bin, obj

See the full built-in rules reference for the complete list and gate conditions. You can extend or replace these rules with a configuration file.

  • 0 — success
  • 1 — nothing found or deletion had failures
  • 2 — usage or environment error