Mac OSX under Uninstall Nodejs

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.