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.

🌐
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

Discussions

How can I fully uninstall Node.js on macOS and then reinstall it from scratch? - LambdaTest Community
How can I fully uninstall Node.js on macOS and then reinstall it from scratch? More on community.lambdatest.com
🌐 community.lambdatest.com
0
June 11, 2024
How do I uninstall Node.js from my deskto… - Apple Community
I installed node.js in hopes I could figure out how to convert a HAR to CSV, but it is proving to be over my current skill set. Anyways, I would like to uninstall node.js, but I am not sure how to do it. It doesn't show up as an application in my application folder. More on discussions.apple.com
🌐 discussions.apple.com
March 17, 2025
How do I uninstall node on osx?
https://stackoverflow.com/questions/11177954/how-do-i-completely-uninstall-node-js-and-reinstall-from-beginning-mac-os-x?rq=1 More on reddit.com
🌐 r/node
17
9
January 15, 2022
have node installed on mac, but not npm, suggestions? is there a way to install npm separately?
Try brew upgrade node to see if that will install npm. Otherwise, uninstall with brew uninstall --ignore-dependencies node and install with brew install node. More on reddit.com
🌐 r/node
13
1
June 24, 2019
🌐
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.
🌐
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 ...
May 13, 2025 - Uninstalling Node.js on macOS can be done in two ways- using Homebrew or manually unistalling files.
🌐
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.
Find elsewhere
🌐
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.
🌐
DEV Community
dev.to › flnzba › how-to-uninstall-and-reinstall-nodejs-and-npm-on-windows-macos-and-linux-manually-via-2c8n
How to Uninstall and Reinstall Node.js and npm on Windows, macOS, and Linux (Manually, via Homebrew, and via nvm) - DEV Community
February 11, 2025 - Using nvm is generally the best option for developers as it allows you to switch between different Node.js versions easily. ... Manual Method: Control Panel (Windows), Terminal (macOS/Linux). Homebrew: brew uninstall node (macOS/Linux).
🌐
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.
🌐
Codedamn
codedamn.com › news › node.js
How to uninstall Node.js? Remove Node.js from your system completely
June 2, 2023 - If you see an output like this: then Node is successfully uninstalled from your computer. Search for “Registry Editor” in the start menu and click on it. Or, Press Win+R to open “run“. Enter “regedit” and hit Enter to open the Windows Registry. A prompt will open asking you to allow the app to make changes. Click Yes. You can either go to the path below or paste it in the path field: ComputerHKEY_LOCAL_MACHINESOFTWARENode.js
🌐
npm
docs.npmjs.com › downloading-and-installing-node-js-and-npm
Downloading and installing Node.js and npm | npm Docs
If you are unable to use a Node version manager, you can use a Node installer to install both Node.js and npm on your system. ... If you use Linux, we recommend that you use a NodeSource installer. If you're using macOS or Windows, use one of the installers from the Node.js download page.
🌐
Apple Community
discussions.apple.com › thread › 256011129
How do I uninstall Node.js from my deskto… - Apple Community
March 17, 2025 - I installed node.js in hopes I could figure out how to convert a HAR to CSV, but it is proving to be over my current skill set. Anyways, I would like to uninstall node.js, but I am not sure how to do it. It doesn't show up as an application in my application folder.
🌐
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.
🌐
Sheridanc
mactech.sheridanc.on.ca › deletenode
Uninstalling Node.js - The Mac Techs @ Sheridan
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 ...
🌐
Medium
medium.com › @abuabdirohman › how-to-uninstall-node-js-that-installed-via-pkg-on-macos-ffab7cd852bb
How to uninstall node Js that Installed via Pkg on macOS - Abu Abdirohman - Medium
June 29, 2022 - How to uninstall node Js that Installed via Pkg on macOS Just running the following code on your terminal sudo rm -rf /usr/local/{bin/{node,npm},lib/node_modules/npm,lib/node,share/man/*/node.*}
🌐
VisionX
visionx.io › home › blog › how to uninstall node.js on different operating systems?
How to Uninstall Node.js on Different Operating Systems? - VisionX
September 4, 2025 - The key is being prepared by backing up existing projects, noting global packages for later reinstallation, and understanding what directories require deletion. Each platform has its own quirks, utilizing the Control Panel or Command Prompt for uninstalling Node.js on Windows, Homebrew or manual deletion for uninstalling Node on Mac, and package managers or source uninstalls for uninstalling Node on Linux or Ubuntu.
🌐
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.
🌐
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.