How do I completely uninstall NodeJS and Reinstall the latest version of NodeJS in Ubuntu?

Rahul Shukla
Apr 25, 2020

--

Uninstall NodeJS from Ubuntu

The command will remove the package but retain the configuration files.

sudo apt-get remove nodejs
sudo apt-get autoremove

To remove both the package and the configuration files run:

sudo apt-get purge nodejs
sudo apt-get autoremove

Install NodeJS on Ubuntu

Adding the NodeJS PPA to Ubuntu

sudo apt-get install software-properties-common
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -

After successfully adding the NodeJS PPA, It’s time now to install NodeJS using the command below.

sudo apt-get install nodejs

Verifying the version of NodeJS and NPM

node -v
npm -v

More Info : http://www.rscoder.com/2020/04/how-do-i-completely-uninstall-nodejs.html

--

--

Rahul Shukla
Rahul Shukla

Written by Rahul Shukla

Back-End Developer & Hybrid App Developer

No responses yet