Apparently, there was a /Users/myusername/local folder that contained a include with node and lib with node and node_modules. How and why this was created instead of in my /usr/local folder, I do not know.

Deleting these local references fixed the phantom v0.6.1-pre. If anyone has an explanation, I'll choose that as the correct answer.

EDIT:

You may need to do the additional instructions as well:

sudo rm -rf \
/usr/local/{lib/node{,/.npm,_modules},bin,share/man}/{npm*,node*,man1/node*}

which is the equivalent of (same as above)...

sudo rm -rf \
  /usr/local/bin/npm \
  /usr/local/share/man/man1/node* \
  /usr/local/lib/dtrace/node.d \
  ~/.npm \
  ~/.node-gyp

or (same as above) broken down...

To completely uninstall node + npm is to do the following:

  1. go to /usr/local/lib and delete any node and node_modules
  2. go to /usr/local/include and delete any node and node_modules directory
  3. if you installed with brew install node, then run brew uninstall node in your terminal
  4. check your Home directory for any local or lib or include folders, and delete any node or node_modules from there
  5. go to /usr/local/bin and delete any node executable

You may also need to do:

sudo rm -rf /opt/local/bin/node /opt/local/include/node /opt/local/lib/node_modules
sudo rm -rf /usr/local/bin/npm /usr/local/share/man/man1/node.1 /usr/local/lib/dtrace/node.d

Additionally, NVM modifies the PATH variable in $HOME/.bashrc, which must be reverted manually.

Then download nvm and follow the instructions to install node. The latest versions of node come with npm, I believe, but you can also reinstall that as well.

Answer from Dominic Tancredi on Stack Overflow
Top answer
1 of 16
2031

Apparently, there was a /Users/myusername/local folder that contained a include with node and lib with node and node_modules. How and why this was created instead of in my /usr/local folder, I do not know.

Deleting these local references fixed the phantom v0.6.1-pre. If anyone has an explanation, I'll choose that as the correct answer.

EDIT:

You may need to do the additional instructions as well:

sudo rm -rf \
/usr/local/{lib/node{,/.npm,_modules},bin,share/man}/{npm*,node*,man1/node*}

which is the equivalent of (same as above)...

sudo rm -rf \
  /usr/local/bin/npm \
  /usr/local/share/man/man1/node* \
  /usr/local/lib/dtrace/node.d \
  ~/.npm \
  ~/.node-gyp

or (same as above) broken down...

To completely uninstall node + npm is to do the following:

  1. go to /usr/local/lib and delete any node and node_modules
  2. go to /usr/local/include and delete any node and node_modules directory
  3. if you installed with brew install node, then run brew uninstall node in your terminal
  4. check your Home directory for any local or lib or include folders, and delete any node or node_modules from there
  5. go to /usr/local/bin and delete any node executable

You may also need to do:

sudo rm -rf /opt/local/bin/node /opt/local/include/node /opt/local/lib/node_modules
sudo rm -rf /usr/local/bin/npm /usr/local/share/man/man1/node.1 /usr/local/lib/dtrace/node.d

Additionally, NVM modifies the PATH variable in $HOME/.bashrc, which must be reverted manually.

Then download nvm and follow the instructions to install node. The latest versions of node come with npm, I believe, but you can also reinstall that as well.

2 of 16
722

For brew users, OSX:

To remove:

brew uninstall node; 
# or `brew uninstall --force node` which removes all versions
brew cleanup;
rm -f /usr/local/bin/npm /usr/local/lib/dtrace/node.d;
rm -rf ~/.npm;

To install:

brew install node;
which node # => /usr/local/bin/node
export NODE_PATH='/usr/local/lib/node_modules' # <--- add this ~/.bashrc

You can run brew info node for more details regarding your node installs.


consider using NVM instead of brew

NVM (node version manager) is a portable solution for managing multiple versions of node

https://github.com/nvm-sh/nvm

> nvm uninstall v4.1.0
> nvm install v8.1.2
> nvm use v8.1.2
> nvm list
         v4.2.0
         v5.8.0
        v6.11.0
->       v8.1.2
         system

you can use this with AVN to automatically switch versions as you hop between different projects with different node dependencies.

🌐
MacPaw
macpaw.com › how to › optimization › apps
How to uninstall Node on your Mac
February 14, 2025 - Follow the steps above to uninstall Node.js and use CleanMyMac to remove any leftover files from Node or any other application. ... Writer and blogger at MacPaw, curious just about everything.
🌐
BrowserStack
browserstack.com › home › guide › removing node.js on mac using homebrew: a step-by-step guide
Removing Node.js on Mac using Homebrew: A Step-by-Step Guide | BrowserStack
April 4, 2025 - Easily remove Node.js from your Mac using Homebrew with this step-by-step guide. Learn how to uninstall, clean up residual files, and verify removal.
🌐
Nektony
nektony.com › home › how to › how to uninstall node.js on a mac
How to Uninstall Node from a Mac - Guides for Any Version
June 30, 2025 - Run the uninstaller. Select the Remaining Files tab in its sidebar. Check leftover files in the left panel. Click the Remove button → confirm the action. That’s all it takes! Your Mac is now spotless from leftover clutter. Remember, regularly scanning for unused programs and forgotten support files can free up valuable space and protect your Mac from some of the most common reasons that slow your Mac down. Node.js removal is a bit more complex than usual, but this guide gives you the full picture.
🌐
Reddit
reddit.com › r/node › how do i uninstall node on osx?
r/node on Reddit: How do I uninstall node on osx?
January 15, 2022 -

Is there an easy way to uninstall node v16.13.2 if I installed from the package download for Max OSX Monterrey? (I have m1 macbook pro so arm version) I want to reinstall using brew because it seems my current installation isn't in the right directory and doesn't have the right file permissions. I can't find an easy solution, and some of the other instructions I find say to cd into /usr/local/include which doesn't seem to exist on my version. It seems like there should just be an uninstall script or something to remove node

🌐
Softsuave
softsuave.com › home › how to uninstall node js: best practices for a clean uninstall
How to Uninstall Node js: Best Practices for a Clean Uninstall
May 13, 2025 - Uninstalling Node.js on macOS can be done in two ways- using Homebrew or manually unistalling files.
🌐
Saturn Cloud
saturncloud.io › blog › how-to-completely-uninstall-and-reinstall-nodejs-on-mac-os-x
How to Completely Uninstall and Reinstall Nodejs on Mac OS X | Saturn Cloud Blog
October 24, 2023 - In this blog post, we have guided you through the process of completely uninstalling Node.js from your Mac OS X system and reinstalling it from the beginning. By following these steps, you can ensure that you have a fresh and up-to-date installation of Node.js on your system, free from any conflicts or outdated versions.
Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › node.js › how-to-completely-uninstall-node-js-reinstall-from-beginning-mac-os-x
How to Completely Uninstall Node.js & Reinstall from Beginning (Mac OS X) ? - GeeksforGeeks
July 23, 2025 - Lastly, remove all Node.js modules and packages. In the terminal, type. This command clears all Node.js modules and packages from the system. ... Step 1: Install Homebrew. Homebrew simplifies software installation and management on Mac. To install Homebrew, execute the following command in the terminal.
🌐
Setapp
setapp.com › how-to › how-to-uninstall-node-on-a-mac
How to uninstall Node.js on a Mac
May 3, 2024 - Select all the applications that you want to uninstall from your Mac. Click Uninstall. ... If you’ve installed Node.js using Homebrew, installation involves the Mac Terminal.
🌐
YouTube
youtube.com › mukesh otwani
How To Uninstall NodeJS From MAC | M1 | M2 | M3 - YouTube
In this video, we will discuss how to uninstall Node from MAC.Using brewbrew uninstall nodeUsing package managerYou can get location by executing below comma...
Published   August 29, 2024
Views   1K
🌐
YouTube
youtube.com › watch
How to uninstall node js from Mac M1 - YouTube
In this video tutorial, I'll demonstrate how we can completely uninstall node.js from Mac
Published   June 26, 2021
🌐
iMyMac
imymac.com › powermymac › how to completely uninstall node on mac (node.js and npm)
How to Completely Uninstall Node on Mac (Node.js and NPM)
July 15, 2024 - Here are the steps to uninstall Node on Mac manually if you get the Node by the binary distribution or by source. Delete Node Manually. First, you have to delete Node manually and move it to Trash. Launch Finder and Terminal.
🌐
Medium
medium.com › @donald.murillo07 › how-to-uninstall-node-js-from-macos-2023-540531994874
How To Uninstall Node.js From MacOs 2023 | by Donald Murillo | Medium
April 25, 2023 - Remove global Node.js packages (optional): If you want to remove global Node.js packages installed on your system, run the following command: ... Press Cmd + Space to open Spotlight search, type in "Terminal," and hit Enter to open the Terminal app. Or any other terminal you use. Run the following command in Terminal to uninstall Node.js:
🌐
MacKeeper
mackeeper.com › blog › mac tutorials › how to uninstall node.js on mac?
How to Uninstall Node.js on Mac? How to Remove It?
June 24, 2025 - While that works, it’s not the most efficient solution. To uninstall some apps, like Node.js, you must remove individual files. MacKeeper’s Smart Uninstaller goes above and beyond by completely uninstalling apps and programs and their leftover files from your MacBook Pro or MacBook Air.
🌐
Medium
medium.com › @jessica_60266 › how-to-uninstall-node-js-on-mac-the-right-way-to-remove-all-traces-bd5e49501bb6
How to Uninstall Node.js on Mac: The Right Way to Remove All Traces | Medium
October 14, 2025 - Learn the proper steps to uninstall Node.js on macOS in 2025. From removing binaries to cleaning up residual files, this guide ensures a complete and clean uninstallation for a smooth setup.
🌐
MakeUseOf
makeuseof.com › home › mac › how to uninstall node.js from your mac
How to Uninstall Node.js From Your Mac
September 14, 2023 - This can be useful if you need to use different versions of Node for different projects. You can uninstall Node.js via Node Version Manager by following these steps: Open the Terminal app on your Mac and run the following command to list all the installed versions of Node.js:
🌐
GitHub
gist.github.com › TonyMtz › d75101d9bdf764c890ef
Uninstall nodejs from OSX Yosemite · GitHub
It saves the time of absolutely removing the node.js · Copy link · Thank you for sharing @tonymtz 👍 · Very helpful trick! But as @e2tha-e wrote (thank you too 👍) @tonymtz On my installation of Node v4.0.0 on Yosemite 10.10.5, the first line needed to be lsbom -f -l -s -pf /var/db/receipts/org.nodejs.node.pkg.bom | while read f; do sudo rm /usr/local/${f}; done A different filename from org.nodejs.pkg.bom Otherwise, this worked like a charm! On macOS Big Sur version 11.2.3 (20D91) with nodejs Latest Current Version: 15.14.0 (includes npm 7.7.6) installed from official website, the file name is not org.nodejs.pkg.bom but org.nodejs.**node**.pkg.bom .
🌐
Sheridanc
mactech.sheridanc.on.ca › index.php › team › mark-galaszkiewicz › uninstalling-nodejs
The Mac Techs @ Sheridan :: Uninstalling Node.js
cd $HOME for package in `ls node_modules`; do npm uninstall $package; done; sudo rm -Rf .npm sudo rm -rf .node-gyp sudo rm -f package-lock.json sudo rm -f package.json cd /usr/local/lib for package in `ls node_modules`; do npm uninstall $package; done; sudo rm -rf /usr/local/bin/npm ...
🌐
Bacancy Technology
bacancytechnology.com › qanda › node › uninstall-node
How to Uninstall Node Using NVM and from Mac?
August 7, 2023 - You can uninstall Node.js using with nvm, it stands for Node Version Manager. For completely uninstall Node on Mac and delete npm is using Homebrew command.