6

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
hellraiser999
  • 71
  • 1
  • 1
  • 2
  • Does this answer your question? [Uninstalling Node and NPM](https://askubuntu.com/questions/1145725/uninstalling-node-and-npm) – M.A.K. Ripon May 02 '20 at 10:34
  • 1
    It does not tell how to uninstall node and npm. I have installed node from the repository. The answer was just talking about the snap uninstall. – hellraiser999 May 02 '20 at 10:58

1 Answers1

5

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.

Kulfy
  • 17,416
  • 26
  • 64
  • 103
ppfeiler
  • 101
  • 1
  • 3