npkill is a quick, free way to list and delete node_modules folders from a terminal. It decides by name, and it deletes on the spot. That's fine for an old project you know is finished. It's risky when coding agents are working across your projects: the node_modules you delete might belong to a session that's still running, or sit inside a worktree holding unsaved work. Devbroom checks all of that first.
Everything agents and builds leave
Devbroom finds node_modules too, along with .next, .turbo, target, .venv and other build folders, plus developer caches such as npm, pnpm and Cargo. It also knows where your agents keep their sessions, scratch folders and caches, and finds git worktrees even outside your project folders. One scan, one list, every item with its verdict.
A name is not evidence
npkill shows the size and last change of each project and puts a warning on node_modules inside apps and hidden folders, then deletes what you select with rm -rf. Its latest release, 0.12.2, matches by one folder name; profiles for other ecosystems are on its main branch but not released yet.
Devbroom looks at more than the name before it calls a folder Ready:
node_modulesneeds apackage.jsonbeside it, must be ignored by git and hold no tracked files.- If an agent session runs in that folder, a process runs from it or a file in it is held open, it's Blocked.
- A worktree with uncommitted changes is Blocked, and Devbroom never uses
--force. - Every item is checked again when you press Clean, goes to the Trash, and can be put back from History.
Every rule is on the Rules page.
An app, a command and your agents
Devbroom is a Mac app with a menu bar panel, and a devbroom command when you'd rather stay in the terminal. Its MCP server lets your agents check a folder before deleting it, or ask you for a cleanup. See Integrations.
Price
Scanning, verdicts, cleaning, History, the command line and MCP are free. Pro is a one-time $29 for 2 Macs and adds Automatic upkeep, Analytics and the session tools. Details on the Pricing page. npkill is free and open source.
Related
- The same checks for every build folder: How to find and clean node_modules and build folders on a Mac.
- Other tools that clean build folders: npkill alternatives and Devbroom vs kondo.
- What Ready, Review and Blocked mean: Verdicts.
When npkill is enough
If you're on Linux or Windows, or you just want one finished project's node_modules gone right now, npkill does exactly that. On a Mac where agents are at work, run devbroom --details on a path first and you'll see its verdict and every reason behind it.
Facts checked on October 9, 2026. Website: npkill
npkill is a trademark of its owner. Devbroom is not affiliated with it. What this page says about npkill comes from its own site and repository; if something has changed, write to support@devbroom.com.