如何在linux下使用cmd行卸载node.js ?


当前回答

不好意思,乔治·贝利的答案很适用,当你 想要从你的机器中移除节点。

这个答案来自:@tedeh https://github.com/nodesource/distributions/issues/486

如果你想安装一个新版本的node,你必须使用下面的代码

sudo rm -rf /var/cache/yum
sudo yum remove -y nodejs
sudo rm /etc/yum.repos.d/nodesource*
sudo yum clean all

并添加新的nodejs版本到“yum”一个新版本的node

#using this command for Node version 8
curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -

#using this command for Node version 10
curl --silent --location https://rpm.nodesource.com/setup_10.x | sudo bash -

安装 nodejs

sudo yum -y install nodejs

我希望这对你们有帮助!!

其他回答

移除安装在centos 8的nodejs: 从主目录运行以下命令

sudo yum remove nodejs

输入y确认命令

如果你只想更新node,也有一个简洁的updater

https://github.com/creationix/nvm

使用,

git克隆git://github.com/creationix/nvm.git ~/.nvm 源代码~ sh - nvm - nvm。 nvm安装v0.4.1

我认为这是有效的,至少部分有效(还没有调查): > . nvm uninstall <VERSION_TO_UNINSTALL 例如:

NVM 卸载 4.4.5

不好意思,乔治·贝利的答案很适用,当你 想要从你的机器中移除节点。

这个答案来自:@tedeh https://github.com/nodesource/distributions/issues/486

如果你想安装一个新版本的node,你必须使用下面的代码

sudo rm -rf /var/cache/yum
sudo yum remove -y nodejs
sudo rm /etc/yum.repos.d/nodesource*
sudo yum clean all

并添加新的nodejs版本到“yum”一个新版本的node

#using this command for Node version 8
curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -

#using this command for Node version 10
curl --silent --location https://rpm.nodesource.com/setup_10.x | sudo bash -

安装 nodejs

sudo yum -y install nodejs

我希望这对你们有帮助!!

对于Ubuntu 12.04:

sudo apt-get remove nodejs

这将卸载nodejs和npm。