Install NodeJS using nvm
How To Install Node.js on Ubuntu 22.04
Last updated
How To Install Node.js on Ubuntu 22.04
Last updated
Apart of install node via apt, another way of installing Node.js that is particularly flexible is to use nvm, the Node Version Manager.
This piece of software allows you to install and maintain many different independent versions of Node.js, and their associated Node packages, at the same time.
To install nvm :
This will install the nvm script to your user account. To use it, you must first source your .bashrc file:
As the v20.x branch is the most stable so far, let's take a look to remote available repos:
node_version
= v20.10.0 or corresponding version
if not specific version is required, it is better to issue:
nvm install --lts
To install the latest LTS version
You can uninstall Node.js using apt or nvm.
apt remove nodejs
or nvm unistall node_version