完全卸载node.js


分类: JavaScript Appium Mobile   1人阅读  评论(0)  收藏  编辑  删除

In mavericks i install from the node pkg (from nodejs site) and I uninstall it so I can re-install using brew. I only do 3 commands at terminal:

  1. sudo rm -rf /usr/local/lib/node_modules/npm/
  2. brew uninstall node
  3. brew doctor

If there is still a node installation, repeat step 2. Then all is ok, I install using brew install node

Cheers,

Pedro


11 

Needed a brew prune to clear broken symlinks also –   Pan Chrono  Feb 20 '14 at 1:11
  
Worked great! don't forget to prune –   HexInteractive  Jul 9 '14 at 14:56
3 
1 worked, but 2 fails. I get "no such keg: usr/local/Cellar/node" –   MSSucks  Feb 12 at 3:32

试尽各种办法,最后还是手动卸载了再重装了npm
1、sudo npm uninstall npm -g
如果步骤1卸不掉npm了(我就是这种情况)
2、进到npm的安装目录 /usr/local/lib/node_modules/npm/
sudo make uninstall
3、手动重装npm
curl -L https://npmjs.com/install.sh | sh
###########node_uninstall.sh####
#!/bin/bash
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.*
###########end#############

node版本控制:
$ npm install -g n
$ n 0.8.17
卸载homebrew for osx
cd `brew -- prefix`
rm
- rf Cellar
brew prune
rm `git ls
- files`
rm
- r Library / Homebrew Library / Aliases Library / Formula Library / Contributions
rm
- rf .git
rm
- rf ~/ Library / Caches / Homebrew
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值