Skip to content

Instantly share code, notes, and snippets.

View AmericaGL's full-sized avatar

AmericaGL AmericaGL

View GitHub Profile
@cwonrails
cwonrails / nukenode.sh
Last active March 24, 2021 15:20
Completely uninstall node.js and npm on Mac OSX regardless of installation method (excluding nvm.) Combined from answers here: https://stackoverflow.com/questions/11177954/how-do-i-completely-uninstall-node-js-and-reinstall-from-beginning-mac-os-x
brew uninstall node; brew prune; sudo rm /usr/local/bin/npm; sudo rm /usr/local/share/man/man1/node.1; sudo rm /usr/local/lib/dtrace/node.d; sudo rm -rf ~/.npm; sudo rm -rf ~/.node-gyp; sudo rm /opt/local/bin/node; sudo rm -rf /opt/local/lib/node_modules; lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done; sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*;