标签:
把这段shell脚本保存为sh文件,如uninstallNode.sh:
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read i; do
sudo rm /usr/local/${i}
done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
更改sh权限: chmod 777 ./uninstallNode.sh
执行sh:./uninstallNode.sh
标签:
原文地址:http://my.oschina.net/luozt/blog/406848