The Terminal way
find ~ -name node_modules -type d -prune lists them, and adding -exec rm -rf {} + deletes them. It works, but it deletes permanently and doesn't check whether the folder belongs to a real project.
The Broom way
Broom finds build folders during its normal scan and only offers one when the project file that recreates it is still next to it. So node_modules needs a package.json beside it, target needs Cargo.toml, Pods needs a Podfile. Each item tells you the command that brings it back.
Build folders Broom recognizes
node_modules,.next,.nuxt,.turbo,.svelte-kit,.parcel-cache,.angulartarget(Rust),.build(Swift),Pods(CocoaPods)buildand.gradle(Gradle, CMake, Flutter),.dart_tool.venvandvenv(Python)
Package manager caches too
Homebrew, npm, Cargo, pip and Gradle keep every download they've ever made. Broom lists those caches with their sizes alongside the build folders.
Questions
Is it safe to delete node_modules?
Yes, if you still have the package.json and lockfile. Run npm install (or your package manager's install) to bring it back.
How much space do node_modules folders take?
A single project is commonly 200 MB to 1 GB. A few dozen old projects can easily add up to tens of GB.
Will Broom touch my Git repositories?
It only offers the rebuildable build folder inside a project, never your source files, and everything goes to the Trash first.