How do you uninstall node.js using the cmd line in linux?
相关问题
- npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fs
- Is shmid returned by shmget() unique across proces
- how to get running process information in java?
- google-drive can't get push notifications
- How to reimport module with ES6 import
In Ubuntu 12.04 simply type this
It will uninstall nodejs and npm as well simple.
Sorry the The answer of George Bailey does work very fine when you want absolutely remove the node from your machine.
This answer is referred from : @tedeh https://github.com/nodesource/distributions/issues/486
If you wanna install a new version of node you have to use the code below
And add new nodejs version to "yum" an new version of node
Install nodejs
I hope it gonna help you guy!!!
I think this works, at least partially (have not investigated):
nvm uninstall <VERSION_TO_UNINSTALL>
eg:nvm uninstall 4.4.5
The answer of George Bailey works fine. I would just add the following flags and use sudo if needed:
If you installed node using
curl
+yum
:Then you can remove it using
yum
:Note that using the
curl
script causes the wrong version of node to be installed. There is a bug that causesnode
v6.7 to be installed instead of v4.x intended by the path(../setup_4.x)
used in thecurl
script.Running
which node
will return something like/path/bin/node
.Then run
cd /path
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.