SweepBarGet it free

npkill vs SweepBar: two ways to clean node_modules on a Mac

By Qiffe · Checked on October 23, 2026 · 3 min read

Both tools find node_modules folders and delete the ones you choose. They are built for different people. npkill is a free terminal tool that gives you control over any folder. SweepBar is a menu bar app that offers only what it considers safe. This page compares them from npkill’s own README and release notes and from how SweepBar works.

At a glance

npkill SweepBar
Interface Terminal Menu bar app
Run it npx npkill, or install it globally with npm Download, open from the menu bar
Price Free, open source (MIT) Scan is free, $5.99 once to unlock sweeping
Finds node_modules below the folder where you start it node_modules, Pods and other build folders of old projects
Other targets Yes, by name with -t, for example .cache, and profiles Fixed list of known folders
Shows sizes Yes, plus when the workspace was last modified Yes
Preview mode Yes, --dry-run Asks before every sweep
Which folders Any you pick, including active projects Only projects untouched for 60 days
Delete all at once Yes, --delete-all, suggested with -x Tick the rows, confirm once
Also clears caches Not described Yes: npm, pnpm, Yarn, Bun, Xcode, Gradle, IDEs
Watches free space Not described; you run it when you want Yes, a threshold you set

Where npkill is the better choice

npkill’s README also warns that some apps installed on the system need their own node_modules to work, and it marks those with a warning symbol. It lists known bugs as well, such as sizes sometimes being higher than they should be. Read it before you run --delete-all.

Where SweepBar is different

What neither does

Neither removes your source code. Both can only delete folders that tools can recreate, but a folder you delete still has to be downloaded again. For what that costs, see Can I delete node_modules? and how to delete all node_modules folders safely.

Which one to pick

Sources

Facts about npkill come from its own public pages, read on October 23, 2026. Things change, so check them before you decide.

Quick answers

Is npkill free?

Yes. It is open source under the MIT license, and its README asks for donations rather than payment.

Can SweepBar delete node_modules in a project I am working on?

No. By design it only offers project folders when nothing in the project has changed for 60 days, git ignores the folder, and a marker file such as package.json proves what the project is.

Which is safer?

They protect you in different ways. npkill shows the folders and marks those some apps need to run, but you choose what to delete. SweepBar limits what it offers to old, git-ignored folders and checks again just before deleting. Either way, node_modules can be reinstalled but check before you delete.