Skip to content

Instantly share code, notes, and snippets.

@Kerrigan29a
Last active August 13, 2017 13:10
Show Gist options
  • Save Kerrigan29a/e49478c46c60dcc5d62c2bef6e53f247 to your computer and use it in GitHub Desktop.
Save Kerrigan29a/e49478c46c60dcc5d62c2bef6e53f247 to your computer and use it in GitHub Desktop.
Uninstall Node in MacOS X
npm ls -gp --depth=0 | awk -F/node_modules/ '{print $2}' | grep -v -e '^$' -e '^npm$' | xargs npm -g rm
sudo rm -rf /usr/local/lib/node_modules/
sudo rm -rf /usr/local/include/node/
sudo rm -rf /usr/local/bin/node
sudo rm -rf /usr/local/bin/npm
sudo rm -rf /usr/local/share/man/man*/node*
sudo rm -rf /usr/local/share/man/man*/npm*
sudo rm -rf /usr/local/lib/dtrace/node.d
rm -rf ~/.npm/
rm -rf ~/.node_repl_history
rm -rf ~/.npmrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment