-
Notifications
You must be signed in to change notification settings - Fork 1
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.
Run:
cleanmymac purgeBy default, CleanMyMac CLI scans common project locations:
~/Projects
~/Code
~/dev
~/GitHub
~/Workspace
cleanmymac purge ~/ProjectsOr one project:
cleanmymac purge ~/Projects/my-projectIn 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.
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-projectcleanmymac analyze ~/ProjectsUse this before cleanup when you want to understand which projects consume the most storage.
brew install --cask macpaw/taps/cleanmymac-cliThen:
cleanmymac purge