OptiClear

Developer Tools

How to Completely Uninstall Node.js / npm on Mac

To uninstall Node.js / npm completely, you must manually remove associated libraries and cache folders since dragging the app to the Trash does not delete them. These remaining files typically occupy between 500 MB – 20 GB.

Last updated: 3 min read

Remove Node.js / npm and everything it leaves behind

Node.js / npm data usually takes 500 MB – 20 GB on a Mac. The free scan shows the exact size on your Mac before you change anything.

Scan your Mac free

Free scan · No account · Nothing is deleted without your OK · Moves to the Trash first · macOS 14+

Application
Node.js / npm
Typical data size
500 MB – 20 GB
Category
Developer Tools
File Location
~/.npm

Manual cleanup steps

  1. Quit the app completely (⌘+Q in the menu bar).
  2. Move Node.js / npm from the Applications folder to the Trash.
  3. Remove the folders Node.js / npm left behind, listed in the table below.
  4. Empty the Trash to free up the space.

Everything Node.js / npm keeps on your Mac

4 locations. Tick each one as you remove it; back up anything marked as your data first.

Locations checked on a Mac with Node.js / npm installed.

What Node.js / npm leaves behind

Specific to Node.js / npm

Removing the main application leaves behind global packages, debug logs, and header files. It also retains the download cache, which is rebuilt automatically upon reinstallation. Because these reside in system directories like /usr/local/lib/node_modules or hidden library folders, they remain on your disk until deleted separately.

Background items
Global packages are installed into the Node prefix, which depends on how Node was installed (official installer, Homebrew, nvm).
License
Node.js and npm are free and open source.
Account and sync
An npm account is only needed to publish packages; the token is stored in ~/.npmrc.

Preparing to remove Node.js / npm

Before deletion, identify which global tools you have installed to facilitate future setups. Ensure you back up authentication tokens used for publishing packages. Note that project dependencies located in individual node_modules folders are separate from the global installation and will stay on your drive.

0 of 3 done

By hand or with OptiClear

By handWith OptiClear
Places to check4 folders, one by oneOne scan
File sizesYou look them up yourselfShown for every item
Removing the wrong thingEasy to delete the wrong folderGoes to the Trash first, so it can be restored
CostFreeScan is free; cleaning needs Pro (yearly plan has a 7-day free trial)

See it working

OptiClear — Scan overview — every category on one screen
Scan overview — every category on one screen
OptiClear — Privacy audit: what each app has been allowed to reach
Privacy audit: what each app has been allowed to reach
OptiClear — Large and aging files, ranked by what they cost you
Large and aging files, ranked by what they cost you

Try it without risk

  1. Download and scan for freeSee every Node.js / npm file and its size. No account needed.
  2. Clean free for 7 daysStart the 7-day free trial of the yearly plan inside the app.
  3. Keep it or cancelCancel in your App Store settings at least 24 hours before the trial ends and you won't be charged.
Download free and scan

After the free trial, Pro costs $39.99 per year in your country's App Store; cancel any time.

Frequently asked questions

Yes. Folders marked “Yes, rebuilt automatically” are rebuilt automatically; removing them only makes the next start slower. Items marked “Yes, once the app is gone” only matter while Node.js / npm is installed, so remove them after the app.
Will deleting the app remove the node_modules folders in my projects?
No, because project dependencies live inside each project folder rather than the global cache.
How do I access the hidden Library folder to find cached headers?
Use Finder > Go > Go to Folder to navigate to the hidden directory.

Related cleanup guides