Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions.

★ 95,785⑂ 10,719👁 1,108⑃ 1,283● 2,475▤ 76◈ 0
ShellMITCreated 2010-04-15
95,785
stars
+13+47+517
10,719
forks
1,108
watchers
1,283
prs
2,475
issues
76
releases
0
discussions

README

Node Version Manager ![Tests][3] ![nvm version][4] 




 Table of Contents

- Intro
- About
- Installing and Updating
  - Install & Update Script
    - Additional Notes
    - Installing in Docker
      - Installing in Docker for CICD-Jobs
    - Troubleshooting on Linux
    - Troubleshooting on macOS
    - Ansible
  - Verify Installation
  - Important Notes
  - Git Install
  - Manual Install
  - Manual Upgrade
- Usage
  - Long-term Support
  - Version Categories
  - Migrating Global Packages While Installing
  - Migrating Global Packages Between Installed Versions
  - Offline Install
  - Default Global Packages From File While Installing
  - io.js
  - System Version of Node
  - Listing Versions
  - Setting Custom Colors
    - Persisting custom colors
    - Suppressing colorized output
  - Restoring PATH
  - Set default node version
  - Use a mirror of node binaries
    - Pass Authorization header to mirror
  - Platforms without official binaries
  - .nvmrc
  - Deeper Shell Integration
    - Calling nvm use automatically in a directory with a .nvmrc file
      - bash
      - zsh
      - fish
- Running Tests
- Environment variables
- Bash Completion
  - Usage
- Compatibility Issues
- Installing nvm on Alpine Linux
  - Alpine Linux 3.13+
  - Alpine Linux 3.5 - 3.12
- Uninstalling / Removal
  - Manual Uninstall
- Docker For Development Environment
- Problems
- macOS Troubleshooting
- WSL Troubleshooting
- Maintainers
- Project Support
- Enterprise Support
- License
- Copyright notice



 Intro

nvm allows you to quickly install and use different versions of node via the command line.

Example:
sh
$ nvm install 24
Now using node v24.14.0 (npm v11.9.0)
$ node -v
v24.14.0
$ nvm use 22
Now using node v22.22.1 (npm v10.9.4)
$ node -v
v22.22.1
$ nvm use 20
Now using node v20.20.1 (npm v10.8.2)
$ node -v
v20.20.1


Simple as that!


 About
nvm is a version manager for node.js, designed to be installed per-user, and invoked per-shell. nvm works on any POSIX-compliant shell (sh, dash, ksh, zsh, bash), in particular on these platforms: unix, macOS, and Windows WSL.



 Installing and Updating

 Install & Update Script

To install or update nvm, you should run the [install script][2]. To do that, you may either download and run the script manually, or use the following cURL or Wget command:
sh
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.41.0/install.sh | bash

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


Running either of the above commands downloads a script and runs it. The script clones the nvm repository to ~/.nvm, and attempts to add the source lines from the snippet below to the correct profile file (~/.bashrc, ~/.bash_profile, ~/.zshrc, or ~/.profile). If you find the install script is updating the wrong profile file, set the $PROFILE env var to the profile file’s path, and then rerun the installation script.


sh
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "

Top issues

Latest release

v0.41.0 v0.41.0 2026-11-04
New Stuff
 - select versions by category: alpha, lts, non-lts, iojs; exclude alphas by default
 - nvm alias: store --lts and --lts=
 - record every node version's LTS status
 - nvm ls-remote: annotate versions with the node alias and local aliases (3920)
 - add nvm_has_italics, to detect terminal italics support via terminfo

 Bug Fixes
 - nvm: treat a bare --only like an empty --only=
 - nvm_ls_remote, nvm_remote_version: match dots between version components literally (3982)
 - nvm_nvmrc_invalid_msg: respect --silent
 - nvm_download: pass $NVM_AUTH_HEADER to curl and GNU Wget in a

Snapshot: 2026-11-10T09:35:25Z · Data license Apache-2.0 · JSON