Last active
December 23, 2021 07:50
-
-
Save ciamac-da/3b65e59f509c8c0b190eda685393c543 to your computer and use it in GitHub Desktop.
Updating Node and Npm ==> This is how to completely uninstall node js and npm on Ubuntu or Debian and installing v14 or v16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt-get remove nodejs | |
| sudo apt-get remove npm | |
| installing nodejs-legacy works if you first apt-get remove node (or better yet, purge) | |
| Then go to /etc/apt/sources.list.d and remove any node list if you have | |
| sudo apt-get update | |
| Check for any .npm or .node folder in your home folder and delete those. If you type which node | |
| you can see the location of the node. Try which nodejs and which npm too. | |
| V16 | |
| # Using Ubuntu | |
| curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - | |
| sudo apt-get install -y nodejs | |
| # Using Debian, as root | |
| curl -fsSL https://deb.nodesource.com/setup_16.x | bash - | |
| apt-get install -y nodejs | |
| V14 | |
| # Using Ubuntu | |
| curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash - | |
| sudo apt-get install -y nodejs | |
| # Using Debian, as root | |
| curl -fsSL https://deb.nodesource.com/setup_14.x | bash - | |
| apt-get install -y nodejs | |
| Please take a look at nodesource for more Information ==> https://github.com/nodesource/distributions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment