Skip to content

Instantly share code, notes, and snippets.

@achesco
Last active August 20, 2017 12:16
Show Gist options
  • Save achesco/78ba692c774e74905266606a986d4159 to your computer and use it in GitHub Desktop.
Save achesco/78ba692c774e74905266606a986d4159 to your computer and use it in GitHub Desktop.
Uninstall node installed from source or from a binary distribution
#bin/bash
# WARNING!!!
# Check out following lines before run!
# npm settings file
# rm ~/.npmrc
rm -r /usr/local/lib/{node,node_modules}
rm -r /usr/local/include/{node,node_modules}
rm /usr/local/bin/{node,node-debug,node-gyp}
rm -r ~/.npm
rm -r ~/.node-gyp
rm ~/.node_repl_history
rm /usr/local/share/man/man1/node*
rm /usr/local/share/man/man1/npm*
rm -r /usr/local/lib/dtrace/node.d
rm -r /opt/local/bin/node
rm -r /opt/local/include/node
rm -r /opt/local/lib/node_modules
rm -r /usr/local/share/doc/node
rm -r /usr/local/share/systemtap/tapset/node.stp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment