Open In App

How to Install and Use NVM on Windows

Last Updated : 04 Feb, 2025
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Share
Report
News Follow

NVM or Node Version Manager is a command-line tool that allows developers to manage multiple versions of Node.js on a single machine. This function offers the flexibility to work on different projects and versions of Node.js. In this guide, we’ll walk you through the steps to install and use NVM on Windows OS.

 Prerequisites:

  • Windows 11, 10, 8, or 7
  • Administrative Rights

Note: It is recommended to uninstall Node.js if your system already has one.

Uninstall Node.js from Windows

This will ensure that there will not be any conflict while performing a clean installation of Node.js

Step 1: Uninstall Node.js

Navigate to Control Panel > Programs > Programs and Features and locate Node.js, select it, and click to Uninstall the files.

node-uninstall

Uninstall Node.js – older versions

Step 2: Remove Residual Files

Delete the Node.js folder from C:\Program Files\ and remove the npm and npm-cache folders from C:\Users\ThisPC\AppData\Roaming\

node-remove

Remove Residual Files

Installing NVM in Windows

In this article, we will learn how to install NVM for Windows. Follow the below steps:

Step 1: Download the Installer

Download the nvm-setup.zip from the assets table located over here. Unzip/Extract the contents (The Zip file should be present in the Downloads folder or the destination you choose to download) by extracting it to nvm-setup.

Download-the-nvm-setup.zip-file

Step 2: Open the Downloaded File

In the nvm-setup folder, double-click on the file named nvm-setup.exe as shown below.

Open-nvm-setup.exe-file

Step 3: Read & Accept the License Agreement

Choose the I accept the agreement option and click on Next to proceed further with the installation.

License-agreement

Step 4: Choose the Path to Finish the Installation Process

Now, select the destination to install and click on Next. 

Select-the-destination-location

Step 5: Choose a Extraction Folder

Select the folder in which setup should create the Node.js symlink, then click Next.

Set-Node.js-symlink

Step 6: Ready to Install

Click on the Install button and once it completes, click on the Finish button.

Click-on-the-Install-button

Step 7: Verify the Installation

Confirm NVM is installed successfully by typing the following command in the terminal

nvm -v

Output: 

Verifying-the-installation-of-NVM

Install Node.js Versions Using NVM

Now, we will Install node.js versions using NVM for Windows OS.

1. List all Available Versions

This command will provide the list of all available Node.js versions:

nvm list available

2. Install Any Specific Versions

If you want to install any specific Nodejs version, run this command:

nvm install 21.7.3

3. Use any Specific Version

If you wish to work on any specific Node.js version, use this command:

nvm use 23.7.0

4. Set a Default Version

Use the following command to set a default Node.js version:

nvm alias default 23.7.0

Verify the Node.js Versions Using NVM

1. Check Node.js Version

This command will display the current Node.js version that you’re using:

node -v

2. Check NPM Version

The following command will display the NPM version associated with the current Node.js version.

npm -v

Conclusion

By following this guide, you can easily manage multiple Node.js versions on your Windows computer using NVM. In this guide, we’ve installation, uninstallation, verify the NPM for Windows. This guide is helpful especially for those who are looking to work on different Node.js versions.

How to Install and Use NVM on Windows – FAQ’s

How do I set a default Node.js version using NVM on Windows?

Use the following command to set a default Node.js version:

nvm alias default 14.7

How do I uninstall a Node.js version using NVM on Windows?

Use the following command to uninstall Node.js version:

nvm uninstall 14.7

How do I update NVM on Windows?

You can visit the NVM for Windows GitHub and get the latest update of NVM.



Next Article

Similar Reads

three90RightbarBannerImg