npkill scans for large development leftovers such as node_modules, caches, and build artifacts. A TUI shows size, age, and lets you delete safely.
Overview
npkill is a command-line disk cleanup tool focused on development environments. It searches from a chosen directory—often the current folder or your home—and lists heavy directories like node_modules, Python caches, Rust build output, and other profile-specific targets.
The interface is a terminal UI that explains controls as you go. You can move between results, inspect details, delete one folder, or use multi-select mode to remove many at once. Search filters narrow results by path, including regular expression patterns, without restarting a scan.
Scanning is profile-driven. Built-in profiles cover Node.js, Python, Rust, PHP, Java, Unity, Godot, Dart, and more, and you can define custom targets in a .npkillrc file. The tool warns about folders that may break installed apps if removed and stresses that safety depends on your review.
For automation, npkill supports JSON and streaming JSON output, non-interactive delete modes, and a Node API for custom scripts. It is distributed via npx and emphasizes fast low-level search despite being written in TypeScript.
Key features
- TUI listing size and last-use hints
- Built-in ecosystem profiles
- Custom profiles via .npkillrc
- Multi-select and bulk delete
- Path filter search with regex
- JSON and json-stream output
- Non-interactive delete for scripts
- Workspace age awareness
Use cases
- Reclaim disk from old node_modules trees
- Clean Python venvs and caches
- Prune stale project artifacts
- Automate cleanup in CI or scripts