sh 从OSX Yosemite卸载nodejs

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 从OSX Yosemite卸载nodejs相关的知识,希望对你有一定的参考价值。

# first:
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.*

# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:

# go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
sudo rm -rf node*

# go to /usr/local/include and delete any node and node_modules directory
cd /usr/local/include
sudo rm -rf node*

# if you installed with brew install node, then run brew uninstall node in your terminal
brew uninstall node

# check your Home directory for any "local" or "lib" or "include" folders, and delete any "node" or "node_modules" from there
# go to /usr/local/bin and delete any node executable
cd /usr/local/bin
sudo rm -rf /usr/local/bin/npm
sudo rm -rf /usr/local/bin/node
ls -las

# you may need to do the additional instructions as well:
sudo rm -rf /usr/local/share/man/man1/node.1
sudo rm -rf /usr/local/lib/dtrace/node.d
sudo rm -rf ~/.npm

以上是关于sh 从OSX Yosemite卸载nodejs的主要内容,如果未能解决你的问题,请参考以下文章

sh OSX for Hackers(Mavericks / Yosemite)

sh 清除OSX Yosemite上的PHPStorm 9.x设置

git pull 上的 OSX 10.10 yosemite beta:git-sh-setup:没有这样的文件或目录

sh OSX for Hackers:Yosemite Edition。此脚本尽量不要*太固定,并且对系统的任何重大更改都需要提示。您'

sh OSX for Hackers:Yosemite Edition。此脚本尽量不要*太固定,并且对系统的任何重大更改都需要提示。您'

sh OSX for Hackers:Yosemite Edition。此脚本尽量不要*太固定,并且对系统的任何重大更改都需要提示。您'