Skip to content

Find and Remove Old node_modules on Mac

Nat edited this page Jul 20, 2026 · 1 revision

Find and Remove Old node_modules on Mac

Old node_modules folders can consume gigabytes across projects you no longer actively use.

CleanMyMac CLI can find them across your development folders and group results by project.

Find old node_modules

Run:

cleanmymac purge

By default, CleanMyMac CLI scans common project locations:

~/Projects
~/Code
~/dev
~/GitHub
~/Workspace

Scan a specific folder

cleanmymac purge ~/Projects

Or one project:

cleanmymac purge ~/Projects/my-project

What purge detects

In addition to node_modules, purge can detect generated project artifacts such as:

node_modules
.next
.turbo
target
.build
.venv
venv
__pycache__
Pods
DerivedData
vendor
cmake-build-*

Results are grouped by project so you can review what each artifact belongs to.

Artifacts older than seven days are preselected. Newer artifacts remain visible but unchecked.

Review before removing

Always inspect the selected project and path before confirming cleanup.

purge targets generated artifacts, not project source code.

Protect an active project when needed:

cleanmymac ignore add ~/Projects/important-project

Check how much space projects use

cleanmymac analyze ~/Projects

Use this before cleanup when you want to understand which projects consume the most storage.

Install CleanMyMac CLI

brew install --cask macpaw/taps/cleanmymac-cli

Then:

cleanmymac purge

Related guides

← Back to Guides

Clone this wiki locally