My Node.js version is stuck at v0.6.1-pre, even after using Brew and NVM to install v0.6.19. When I restart bash, NVM shows:
nvm ls
v0.6.19
current: v0.6.1-pre
default → 0.6.19 (-> v0.6.19)
How can I uninstall Node.js on Mac and resolve this version issue?
Hi,
Follow the below steps:
-
Reinstall NVM and Node.js
-
Uninstall NVM:
rm -rf ~/.nvm
-
Remove Node.js and npm:
sudo rm -rf /usr/local/{bin/{node,npm},lib/node_modules}
- Reinstall NVM:
Follow the installation instructions from the NVM GitHub repository
- Install the desired Node.js version:
- nvm install v0.6.19
- nvm use v0.6.19
You can also try these steps:
-
Remove Existing Node.js and Install via NVM
-
Uninstall Node.js installed via Brew:
brew uninstall --force node
- Clean up Node.js and npm directories:
sudo rm -rf /usr/local/bin/node
sudo rm -rf /usr/local/bin/npm
sudo rm -rf /usr/local/lib/node_modules
sudo rm -rf /usr/local/include/node
sudo rm -rf ~/.npm
- Install Node.js via NVM:
nvm install v0.6.19
nvm use v0.6.19