如何卸载n和n安装的所有节点版本 [英] How to uninstall n and all node versions installed by n
问题描述
我已经使用工具 n
安装了一些 Node.js 版本.我已经使用以下方法卸载了所有 Node.js 版本:
I have installed some Node.js versions with the tool n
. I have uninstalled all Node.js versions using:
sudo n prune
当前(激活)版本除外.如果我尝试卸载当前版本:
except the current (activated) version. If I try to unsinstall the current version:
sudo n rm 6.10.2
我收到以下错误:
错误:无法删除当前活动的版本 (node/6.10.2)
.
我不知道如何设置系统 (Arch Linux) 默认的 Node.js 版本,该版本已经安装并用于安装 n
.
I can not figure out, how to set the systems (Arch Linux) default Node.js version, which is already installed and was used to install n
.
如果卸载 n
使用:
sudo npm uninstall -g n
它在我的电脑上保留了当前版本.
it leaves the current version on my computer.
ls /usr/local/n/versions/node/
6.10.2/
是否需要手动删除文件夹:/usr/local/n/
?或者,n
中是否有一个选项可以卸载它以及 n
安装的所有 Node.js 版本,以便我在安装 n<之前获得设置/代码>?
Do I need to manually delete the folder: /usr/local/n/
? Or, is there an option in n
to uninstall it and all the Node.js versions installed by n
, so that I get the setting before I installed n
?
推荐答案
需要手动删除n
安装的Node版本,并设置正确的Node系统版本.
You need to manually remove Node versions installed by n
and set the correct Node system version.
sudo n prune
sudo npm uninstall -g n
sudo rm -r /usr/local/n
sudo rm /usr/local/bin/node
在 GitHub 上查看 n
的以下问题:
See the following issues for n
on GitHub:
这篇关于如何卸载n和n安装的所有节点版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!