Sometimes the hand to see the new version of the upgrade, after the upgrade found a bunch of modules can not be used, a good mood slowly tune, but there are bad times, can only unload the low-load version of node.
My machine environment is as follows
1. Mac OSX 10.10.3
2. Node is 0.12.2
Uninstallation process
1. Copy the following code into an SH file (e.g. uninstall_node.sh)
#!/bin/bashlsbom-f-l-s-pf/var/db/receipts/org.nodejs.pkg.bom | while read I; Do sudo rm/usr/local/${i}donesudo rm-rf/usr/local/lib/node /usr/local/lib/node_modules /var/db/ receipts/org.nodejs.*
2. Need to modify the Uninstall_node.sh file properties
Some will prompt "Permission denied"
Enter the following command to modify the file properties
chmod 777 uninstall_node.sh
3. Run the file under the Mac terminal, you can drag the uninstall_node.sh directly to the terminal, and then wait for about 1 minutes
You can see that node has been uninstalled, enter the node command, prompt command not found
Related:
https://github.com/jesseyu/uninstallNodejs/blob/master/uninstallNodejs.sh
Mac OSX under Uninstall Nodejs