nvm uninstall doesn't actually uninstall the node version

node.jsNvm

node.js Problem Overview


So I'm trying to clear out older versions of node.js.

I start with:

$ nvm ls
      v0.10.30
      v4.2.3
->    v6.6.0
      system

I don't want the older versions, so I then do:

$ nvm uninstall 4.2.3
Uninstalled node v4.2.3

I then verify that it's done what I wanted, but it gives the same list of installed versions as before:

$ nvm ls
      v0.10.30
      v4.2.3
->    v6.6.0
      system

Specifically, v4.2.3 is still there.

Any ideas what I might be doing wrong? Any other way to force the uninstall? I'm using the Cloud 9 IDE.

node.js Solutions


Solution 1 - node.js

removing manually:

cd ~/.nvm/versions/node
sudo rm -rf v4.2.3/

Solution 2 - node.js

Remove by command

nvm uninstall <version> 
nvm uninstall v16.7.0

remove manually

cd ~/.nvm/versions/node
sudo rm -rf v16.7.0/

Solution 3 - node.js

cd ~/.nvm/versions/node
rm -Rf v4.2.3

Try clearing cash nvm cache clear

Solution 4 - node.js

It works now, in nvm version 0.35.1. Or at least it worked for me.

If the node version we want to uninstall is the currently used one though, before uninstalling it we need to nvm use another version.

Solution 5 - node.js

nvm deactivate then nvm uninstall 4.2.3 or (version number)

it will work.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestiondrmrbrewerView Question on Stackoverflow
Solution 1 - node.jssudoView Answer on Stackoverflow
Solution 2 - node.jsMADHUR GUPTAView Answer on Stackoverflow
Solution 3 - node.jsFlavio LimaView Answer on Stackoverflow
Solution 4 - node.jssilvanasonoView Answer on Stackoverflow
Solution 5 - node.jsTino Jose ThannipparaView Answer on Stackoverflow