完全删除mac上的node.js

Mac – So I have been hit by an issue during uninstall of Node.js on my mac. I encountered some strange behaviour like npmis still their even after having removing it with all this.

In order to delete the ‘native’ node.js installation, the following is the best way to completely uninstall node + npm:

1go to /usr/local/lib and delete any node and node_modules
2go to /usr/local/include and delete any node and node_modules directory
3if you installed with brew install node, then run brew uninstall node in your terminal
4check your Home directory for any local or lib or include folders, and delete any node or node_modules from there
5go to /usr/local/bin and delete any node executable

You may need to do the additional instructions as well:

1sudo rm /usr/local/bin/npm
2sudo rm /usr/local/share/man/man1/node.1
3sudo rm /usr/local/lib/dtrace/node.d
4sudo rm -rf ~/.npm
5sudo rm -rf ~/.node-gyp
6sudo rm /opt/local/bin/node
7sudo rm /opt/local/include/node
8sudo rm -rf /opt/local/lib/node_modules
9sudo rm -rf /usr/local/include/node/

转载于:https://my.oschina.net/chzhuo/blog/804450

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值