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
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
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
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 .