Using nvm to control your node version

  • Frontend
  • 04 Jun, 2023

At times, we may need to switch between different versions of Node.js. This can be easily done using a tool called nvm (Node Version Manager).

Installation

Github Repo

You can install nvm by running the following command:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

Usage

#Install the latest version
nvm install node

#Install and Use a specific version
nvm install 14.17.2
nvm use 14.17.2

#List available versions
nvm list
nvm list available

#Switch versions
nvm use x.x.x

#Uninstall a specific version
nvm uninstall 14.5.0
Tags :