Skip to content

Instantly share code, notes, and snippets.

@danielhavir
Last active July 30, 2018 15:49
Show Gist options
  • Star 14 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save danielhavir/5a64311449556ca6cf83956a85f998ec to your computer and use it in GitHub Desktop.
Save danielhavir/5a64311449556ca6cf83956a85f998ec to your computer and use it in GitHub Desktop.
JavaScript Must Die!
### Removes Node and NPM from mac OS ###
# Uninstall using NPM
npm uninstall npm -g || echo "NPM uninstall didn't work"
# Try if Node's installed with Brew
(brew uninstall node&&brew prune)||echo "Node was not installed with Brew"
# Remove all files and folders including Node or NPM
rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/{npm*,node*,man1/node*}
rm -rf /usr/local/bin/npm /usr/local/share/man/man1/node* /usr/local/lib/dtrace/node.d ~/.npm ~/.node-gyp /opt/local/bin/node opt/local/include/node /opt/local/lib/node_modules
rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/npm*
rm -rf /usr/local/include/node*
rm -rf /usr/local/share/man/man1/node*
rm -rf /usr/local/share/man/man1/npm*
rm -rf /usr/local/share/man/man5/npm*
rm -rf /usr/local/share/man/man7/*npm*
rm -f /usr/local/share/man/man5/package.json.5
rm -f /usr/local/share/man/man5/package-lock.json.5
rm -f /usr/local/share/systemtap/tapset/node*
rm -rf /usr/local/share/doc/node*
# Now you're good to live happily ever after
tput setaf 2; echo "################# It's gone! I can see the shire. #################"; tput sgr0;
@16kilobyte
Copy link

Hahahahaha! It'd be easier throw the computer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment