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.
Leave a Reply
You must be logged in to post a comment.