How can I uninstall Node.js on Mac and resolve version issue?

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:

  1. Reinstall NVM and Node.js

  2. Uninstall NVM: rm -rf ~/.nvm

  3. Remove Node.js and npm:

sudo rm -rf /usr/local/{bin/{node,npm},lib/node_modules}

  1. Reinstall NVM:

Follow the installation instructions from the NVM GitHub repository

  1. Install the desired Node.js version:
  2. nvm install v0.6.19
  3. nvm use v0.6.19

You can also try these steps:

  1. Remove Existing Node.js and Install via NVM

  2. Uninstall Node.js installed via Brew:

brew uninstall --force node

  1. 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
  1. Install Node.js via NVM:
  nvm install v0.6.19
  nvm use v0.6.19