My Development Notes

Programming Made Easier


How to uninstall and reinstall NodeJS on your Linux Ubuntu system using the terminal?

First open up the terminal using the keyboard shortcut Ctrl+Alt+T. Next type the following command to uninstall any previous versions completely from your system :

sudo apt purge --autoremove nodejs npm

This will remove all the previous files and folders for NodeJS (including NPM). You can run the following commands to check whether its done:

node -v
npm -v

Next, to reinstall the latest version of NodeJS (with NPM) run the following terminal commands :

sudo apt install nodejs

The above command will install the latest version of NodeJS with NPM on your system to be used afresh.


Posted

in

by

Tags:

Leave a Reply