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 - Go to your Home folder and drag the files below to the Trash: .npm; .node-gyp; .nodereplhistory. Empty the Trash. If you installed Node using Homebrew, go to Applications > Utilities and open Terminal, then type the following command: ... That ...
🌐
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 - As software engineers we all know that Nodejs is a powerful and popular platform for building fast and scalable web applications However sometimes we may need to completely uninstall Nodejs and start from scratch This could be due to various reasons such as outdated versions conflicts with other software or simply wanting a fresh start In this blog post we will guide you through the process of completely uninstalling Nodejs from your Mac OS X system and reinstalling it from the beginning
🌐
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 - Use a tool like App Cleaner & Uninstaller to remove any hidden leftovers automatically. ... Open Finder. Press Cmd + Shift + G and go to each of the following paths: ... Delete any files or folders that contain node, npm, or are clearly related.
🌐
DEV Community
dev.to › whovishnu › complete-removeuninstall-node-form-mac-os-1kln
Complete Remove/Uninstall node form mac OS - DEV Community
January 30, 2023 - To remove Node.js from a Mac, follow these steps: Uninstall Node.js using npm: npm uninstall -g...
🌐
Setapp
setapp.com › how-to › how-to-uninstall-node-on-a-mac
How to uninstall Node.js on a Mac
May 3, 2024 - Delete all other associated folders by typing in sudo rm -rf node npm npx and pressing enter. This process should completely delete Node.js. Want to elevate your Terminal experience? Core Shell is the perfect full-featured SSH terminal that boasts advanced features such as tag organization for hosts, tons of customization options, OpenSSH support, and even integration with macOS Keychain.
🌐
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 - This command removes Node.js, NPM, NPX, and related files. 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 ...
Find elsewhere
🌐
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

🌐
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 - To do this, run the following command on your Terminal: “rm –rf ~/.npm”. Once you have typed the command found within the quotes, you will have completed the task of uninstalling Node on Mac uninstalling NPM.
🌐
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 - Learn how to completely remove Node.js on Mac using Homebrew with this step-by-step guide, including cleanup, verification, and optional dependency removal.
🌐
GitHub
gist.github.com › bradwestfall › 2ca354323e30924c9099
Remove Node and NPM on OS X.md · GitHub
sudo rm -rf /usr/local/lib/dtrace/node.d /usr/local/lib/node_modules /usr/local/bin/npm /usr/local/bin/nodemon /usr/local/bin/node /usr/local/include/node ~/.npm* ~/.node* /usr/local/share/man/*/node* /usr/local/share/man/*/npm* ... Can't uninstall node on mac to reinstall the stable version.
🌐
GitHub
gist.github.com › cwonrails › e6924c749307220e3d96
Completely uninstall node.js and npm on Mac OSX regardless of installation method (excluding nvm.) Combined from answers here: https://stackoverflow.com/questions/11177954/how-do-i-completely-uninstall-node-js-and-reinstall-from-beginning-mac-os-x · GitHub
Completely uninstall node.js and npm on Mac OSX regardless of installation method (excluding nvm.) Combined from answers here: https://stackoverflow.com/questions/11177954/how-do-i-completely-uninstall-node-js-and-reinstall-from-beginning-mac-os-x - nukenode.sh
🌐
Stack Abuse
stackabuse.com › how-to-uninstall-node-js-from-mac-osx
How to Uninstall Node.js from Mac OSX
March 14, 2017 - Delete node, node-debug, and node-gyp from /usr/local/bin · Delete .npmrc from your home directory (these are your npm settings, don't delete this if you plan on re-installing Node right away)
🌐
Reactgo
reactgo.com › home › how to completely uninstall and re-install node.js and npm in mac os
How to completely uninstall and re-install Node.js and npm in Mac OS | Reactgo
August 20, 2023 - sudo rm -rf /usr/local/bin/npm sudo rm -rf /usr/local/bin/node · Verify if the node is completely uninstalled or not using node -v command. If the output shows command not found then you are successfully uninstalled. We are using the node version manager (nvm) to download and install the latest version of node.js (with npm included).
🌐
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.
🌐
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 - This command erases the npm executable from the system. ... Step 4: Eliminate Node.js Modules. 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.
🌐
Quora
quora.com › How-can-I-completely-uninstall-Node-js-from-MacOS
How to completely uninstall Node.js from MacOS - Quora
Answer: * Delete node and/or node_modules from [code ]/usr/local/lib[/code] * Delete node and/or node_modules from [code ]/usr/local/include[/code] * Delete node, node-debug, and node-gyp from [code ]/usr/local/bin[/code] * Delete .npmrc from ...
🌐
npm
docs.npmjs.com › cli › v6 › using-npm › removal
removal | npm Docs
That will remove npm, but leave behind anything you've installed. If that doesn't work, or if you require more drastic measures, continue reading. Note that this is only necessary for globally-installed packages. Local installs are completely contained within a project's node_modules folder. Delete that folder, and everything is gone less a package's install script is particularly ill-behaved).
🌐
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 - # rm –rf ~/.npm · And there you have it; you’ve successfully removed Node.js on your Mac. The thought of uninstalling Node.js on a Mac can be daunting. Chances are, like many people, you don’t really know where to start or which method to use. As you can see, it can be a tedious process.