Created
March 7, 2015 00:22
-
-
Save mdeangelo272/efe9ccb009d2bdbda1cf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# This script removes node.js and npm, that were installed using a 'pkg' package, from Mac OS X. | |
# It should be run using sudo | |
# REFERENCE: http://stackoverflow.com/questions/9044788/how-do-i-uninstall-nodejs-installed-from-pkg-mac-os-x | |
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom \ | |
| while read i; do | |
rm /usr/local/${i} | |
done | |
rm -rf /usr/local/lib/node \ | |
/usr/local/lib/node_modules \ | |
/var/db/receipts/org.nodejs.* | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment