Completely removing Node.js and Npm

Apparently i needed to completely remove my node.js and npm installation in my mac mavericks because i have installed various version of node.js from brew and website. After removing node from Brew, i am still able to access my node on my terminal and decides to write this to help anyone who is looking into removing and reinstalling node altogether (either from source or brew)

Removing Node.js

Credit goes to Dominic Tancredi
To recap, the best way (I've found) to completely uninstall node + npm is to do the following:

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

You may need to do the additional instructions as well:

  • remove: /usr/local/bin/npm
  • remove: /usr/local/share/man/man1/node.1
  • remove: /usr/local/lib/dtrace/node.d
  • execute: rm -rf /Users/[homedir]/.npm

3 thoughts on “Completely removing Node.js and Npm

  1. It's in reality a great and useful piece of info.
    I'm satisfied that you simply shared this useful information with us.
    Please keep us up to date like this. Thank you for sharing.

  2. Excellent post! I´d been struggling with this until I found your complete post! Thanks

Comments are closed.