How can I completely uninstall nodejs, npm and node in Ubuntu [closed]
Answer a question
The Question is similar to How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X) but for Ubuntu, and just for uninstalling.
Installation was done by: sudo apt-get install node
How do I completely remove npm along with all libraries, packages and any other files installed by npm on my system, via e.g. npm install -g @vue/cli?
I do plan to reinstall npm afterwards.
Answers
sudo apt-get remove nodejs
sudo apt-get remove npm
Then go to /etc/apt/sources.list.d and remove any node list if you have. Then do a
sudo apt-get update
Check for any .npm or .node folder in your home folder and delete those.
If you type
which node
you can see the location of the node. Try which nodejs and which npm too.
I would recommend installing node using Node Version Manager(NVM). That saved a lot of headache for me. You can install nodejs and npm without sudo using nvm.
更多推荐
所有评论(0)