The Problem
Every JavaScript/Node project keeps its own copy of node_modules — the folder where all your installed dependencies live. It's not shared between projects by default. If you've worked on a few dozen projects over the years — client work, prototypes, side builds — every single one is silently holding its own multi-hundred-MB to multi-GB copy of the same dependencies, sitting untouched on disk long after the project itself is done.
I hadn't cleaned any of this up. My Projects folder had grown to 134GB, and I had no idea which part of it was actually necessary.
Finding the Actual Problem
I checked what was taking up the space rather than guessing. The fastest way to see this on a Mac:
- Finder → About This Mac → Storage → Manage gives a rough breakdown, but it's not granular enough to point at a specific folder.
- A proper folder-size scan is what actually finds it. Tools like
ncdu(terminal) or GrandPerspective/DiskSight (GUI) will show you exactly which folders are the heaviest, down to the subfolder level.
Once I looked, node_modules folders across old projects made up 98GB of the 134GB — the single biggest chunk by far.
The Fix
Delete every node_modules folder you don't currently need running. It's completely safe, because node_modules is never something you write by hand — it's entirely regenerated from your package.json and lockfile.
To get it back for any project, you just run:
bash npm install
And the exact same dependency tree rebuilds itself.
For finding and clearing every node_modules folder under your Projects directory at once, instead of doing it project by project:
bash find ~/Projects -name "node_modules" -type d -prune -exec rm -rrf'{}' +
This walks every subfolder, finds any directory named node_modules, and deletes it — recursively, across every project at once.
Why This Keeps Happening
If you're actively juggling multiple projects, this isn't a one-time cleanup — it's a recurring cost of how Node package management works. A few ways to reduce how often it piles back up:
- Use pnpm instead of npm for new projects. pnpm uses a shared global store and links packages instead of duplicating them per project, which cuts disk usage dramatically across multiple projects using the same dependencies.
- Delete node_modules for any project you haven't opened in a month or more. You can always reinstall in seconds when you actually reopen it.
- Run a periodic scan (
ncduon your Projects folder) every couple of months instead of waiting until storage runs out to notice.
The Takeaway
98GB gone, in minutes, with zero risk — because none of it was actually unique data. If your Mac's storage is mysteriously full and you do any kind of JS/Node development, your Projects folder's node_modules folders are the first place to check, not the last.



