3

I tried these two commands to uninstall node js but I am not able to do it.

sudo apt-get purge nodejs
sudo apt-get autoremove

when I check for version, it shows

v9.3.0

And I want to install node 8.x

Asif Ahmed
  • 137
  • 2
  • 6
  • 20

2 Answers2

2

I got the same problem.

Step 1: Find the node location using

rails@rails-All-Series:~$ whereis node
node: /usr/local/bin/node

Step2: Remove node module from these the location.

rails@rails-All-Series:/usr/local/bin$sudo rm -rf node
Mr Singh
  • 3,936
  • 5
  • 41
  • 60
-1

Below mentioned link specifies how to delete node package from ubuntu

sudo apt-get purge nodejs

it will only be purging related nodejs packages

Other Alternative will be:

 sudo apt-get purge --auto-remove nodejs

it will be implementing the below mentioned commands internally:

 sudo apt-get purge nodejs
 sudo apt-get autoremove

autoremove will actually be removing the related package and they were installed as a dependency module .

Osama Rizwan
  • 615
  • 1
  • 7
  • 19
Rohan
  • 2,681
  • 1
  • 12
  • 18