这个问题类似于How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X),但对于Ubuntu,只是为了卸载.
安装完成时间:sudo apt-get install node
如何通过例如npm install -g @vue/cli
完全删除npm以及npm在我的系统上安装的所有库、包和任何其他文件?
我确实计划以后重新安装npm.
这个问题类似于How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X),但对于Ubuntu,只是为了卸载.
安装完成时间:sudo apt-get install node
如何通过例如npm install -g @vue/cli
完全删除npm以及npm在我的系统上安装的所有库、包和任何其他文件?
我确实计划以后重新安装npm.
sudo apt-get remove nodejs
sudo apt-get remove npm
然后转到/etc/apt/sources.list.d
,删除所有 node 列表(如果有的话).然后做一个
sudo apt-get update
Check for any 100 or 101 folder in your home folder and delete those.
如果你打字
which node
可以看到 node 的位置.也试试which nodejs
和which npm
.
我建议使用 node 版本管理器(NVM)安装 node .这让我省go 了很多头痛.您可以使用nvm安装nodejs和npm,而无需安装sudo
.