comparison

Sweep vs npkill: a Mac app or a terminal tool for cleaning node_modules?

Quick answer

Use npkill if you want free and open source (MIT), work in the terminal, and mostly clean node_modules: npx npkill. Use Sweep if you have Flutter, React Native, CocoaPods, Python, Rust or Gradle projects too, want them grouped per project with your last commit date, a restore command for each, and guards against deleting anything git tracks or a running process uses.

Side by side

npkillSweep
PriceFree, MIT licenseFree scan; cleaning $7.99 one time (3 Macs)
InterfaceInteractive terminal list (npx npkill)Native Mac app, menu bar total
What it findsnode_modules by default; other names with --targets or --profilesnode_modules, .next, Pods, .venv, target, Flutter and Gradle builds, .dart_tool, .cxx, vendor, .build, ios/build, each confirmed by a project file next to it
AgeA last_mod column (last time a file in the workspace changed); sort by ageSafe / Caution / Active per project, from your last git activity and your own edits (lockfiles and installs don't count)
SafetyMarks folders an app needs to work; --exclude-sensitiveNever lists anything git tracks; skips folders a process has open or is working in; re-checks every folder right before deleting
DeletingPick and delete, --delete-all, --dry-runClean All Safe, or project by project; delete or Move to Trash; shows what the disk actually got back
Getting it backUp to youThe exact restore command per folder, from its lockfile
Global cachesNonpm, pnpm, yarn, bun, Gradle, Maven, Cargo, pip, uv, Pub, CocoaPods, Composer, Go
Scripting--json, --json-streamCSV report export
PlatformsA Node.js command-line toolmacOS 14+, Apple silicon and Intel

We make Sweep. npkill facts are from its own README on GitHub (checked 2026-10-06); if anything changed, tell us at sweep@qubixcode.com and we'll fix it.

When npkill is the better choice

  • You want free and open source.
  • You live in the terminal, or want to script cleanups (its JSON output is handy for that).
  • Your projects are mostly Node, and you know which ones are safe to delete.
  • You're on Linux or Windows.

When Sweep is the better choice

  • You build mobile apps: React Native and Flutter projects spread their weight across node_modules, Pods, Android builds, .cxx and .dart_tool, and Sweep shows them as one project.
  • You have dozens of old projects and want to know which ones you really stopped working on, not just which folders changed recently.
  • You want a safety net: nothing git tracks, nothing in use, and the command to undo it right next to every folder.

Also worth knowing

kondo is another free, MIT-licensed cleaner (a Rust command-line tool, with a separate kondo-ui app) that covers 20+ project types and can filter by age with --older. It installs with Homebrew.

Questions

Is npkill safe?

It deletes what you select, permanently. It marks folders an app needs to run and has --exclude-sensitive and --dry-run options. Check the list before deleting.

Can npkill delete folders other than node_modules?

Yes: --targets takes a comma-separated list of folder names, and --profiles offers predefined sets.

Does Sweep use npkill?

No. Sweep has its own scanner written in Swift that confirms each folder with a project file next to it and dates each project from git.

Is there a free GUI alternative?

kondo has a separate GUI app, kondo-ui. npkill is terminal-only.