How do you uninstall node.js using the cmd line in linux?
Join Stack Overflow to learn, share knowledge, and build your career.
|
Running Then run This is all that is added by Node.JS.
Now the only thing I don't know about is npm and what it has installed. If you install npm again into a custom path that starts off empty, then you can see what it adds and then you will be able to make a list for npm similar to the above list I made for node. |
||||
|
In Ubuntu 12.04 simply type this
It will uninstall nodejs and npm as well simple. |
|||||||||||||||||||||
|
|
If you installed from source, you can issue the following command:
If you followed the instructions on https://github.com/nodejs/node/wiki to install to your $HOME/local/node, then you have to type the following before the line above:
|
|||||||||||||||||||||
|
|
To uninstall node I followed the accepted answer by @George, as I no longer have the sources, but before doing so I ran:
That seemed to get rid of npm from the system directories such as |
||||
|
|
|
if you want to just update node, there's a neat updater too https://github.com/creationix/nvm to use,
|
||||
|
|
|
The answer of George Bailey works fine. I would just add the following flags and use sudo if needed:
|
|||||||||
|
|
If you installed node using
Then you can remove it using
Note that using the |
|||
|
|
|
This is better to remove NodeJS and its modules manually because installation leaves a lot of files, links and modules behind and later it create problems while we reconfigure another version of NodeJS and its modules. Run the following commands.
sudo rm -rf /usr/local/lib/node* sudo rm -rf /usr/local/include/node* sudo rm -rf /usr/local/bin/node* and this done. A step by step guide with commands is at http://amcositsupport.blogspot.in/2016/07/to-completely-uninstall-node-js-from.html This helped me resolve my problem. |
||||
|
|
|
after installing using the "ROCK-SOLID NODE.JS PLATFORM ON UBUNTU" script, i get this output. Which tells you how to uninstall nodejs.
|
|||||
|
|
Best way to go around this is to do it right from the BEGINNING: INSTALL BREW
Then at the end of your .bashrc file(In your home directory press Ctrl + H)
Then restart terminal so the modification to .bashrc are reloaded TO INSTALL NODE
TO CHECK VERSION
TO UPDATE NODE
TO UNINSTALL NODE
|
|||||||||
|
|
I think this works, at least partially (have not investigated):
|
|||
|
|