Uninstalling node and npm and then again reinstalling

I have run into an [issue] and looking to remove nodejs and npm completely and then install again. I have installed node from the terminal. What's the best way to do it? My system is Ubuntu 20.04LTS.

Current version:

node -v
v12.16.3
npm -v
6.14.4
2

1 Answer

If you used apt install nodejs and apt install npm, you can remove it with apt purge nodejs and apt purge npm.

But if you used snap, then you can run the following command: snap remove node.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like