0

When i do nvm ls

->       v4.3.2
         system
default -> 4.3.2 (-> v4.3.2)
node -> stable (-> v4.3.2) (default)
stable -> 4.3 (-> v4.3.2) (default)
iojs -> N/A (default)

and when I do nodejs --version I get v0.10.25

How can i get rid of v0.10.25?

I referred this followed top two answers. I want to remove 0.10.25 which i installed using sudo apt-get install nodejs

Community
  • 1
  • 1
prashantitis
  • 1,698
  • 19
  • 47

2 Answers2

1

You probably missed your ~/.profile setup or didn't yet executed it after nvm installation. See this howto for example and check that you have somthing like this in your ~/.profile file:

export NVM_DIR="/home/<your_user_name>/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"  # This loads nvm

If you have it, try to execute source ~/.profile and try again.

After that, if you execute which node, it should output something like:

/home/<your_user_name>/.nvm/<your_selected_node_version>/bin/node
bitifet
  • 3,083
  • 13
  • 30
0

Instead of randomly searching for nodejs installation folder first use which nodejs that would give something like /usr/bin/nodejs

Now go in /usr/bin and use sudo rm -rf nodejs to remove nodejs.

Now type nodejs --version It should come node's version which you installed using nvm.

prashantitis
  • 1,698
  • 19
  • 47