SoFunction
Updated on 2025-04-11

Practical steps for installing nvm multi-version management of mac

Introduction to NVM functions

NVM (Node Version Manager) is a command line tool for managing multiple versions. It allows developers to install, switch and uninstall different versions on the same machine, thus solving the problem of version incompatibility. Here are some of the main features and uses of NVM:

  • Install and switch versions

    NVM can help developers switch easily between different versions, which is very useful for developers who need to work in multiple projects that rely on different versions. With NVM, you can install any remote long-term support (LTS) version with simple commands, or switch between multiple versions directly from the command line.
  • Set an alias

    NVM allows setting aliases to facilitate easy switching between different downloaded versions.
  • View version list

    usenvm listThe command can display the installed version, andnvm list availableAll versions that can be downloaded can be displayed.
  • Install the specified version

    passnvm install <version>The command can install a specified version, for examplenvm install 14.5.0Install version 14.5.0, or usenvm install latestInstall the latest version.
  • Switch to use the specified version

    usenvm use <version>The command can be switched to a specified version, for examplenvm use 14.5.0Switch to version 14.5.0.
  • Uninstall the specified version

    passnvm uninstall <version>The command can uninstall a specified version, for examplenvm uninstall 14.5.0Uninstall version 14.5.0.
  • View the current version

    usenvm currentThe command can view the current version.
  • NVM installation

    On Windows systems, you can download the installation package from the GitHub page of NVM-Windows for installation. On macOS/Linux, NVM can be installed by running simple commands on terminals.
  • Uses of NVM

    NVM is particularly suitable for development scenarios where multiple versions are required to manage on the same machine, such as version incompatibility between projects, upgrades and downgrading versions, and collaborative development by multiple people.

By using NVM, developers can manage the environment more flexibly and improve development efficiency and project compatibility.

Mac installation practice

1. Download nvm

/nvm-sh/nvm/releases/tag/v0.40.1

2. Install nvm

After decompression

./ 
nvm -v       
0.40.1

After installation, verify the version and get it done!

Next start the installation

3. Installation

(1) Check which versions can be installed, and execute the command: nvm ls-remote

nvm ls-remote 
        v0.1.14
        v0.1.15
        --------
        ---------
       v10.12.0
       v10.13.0   (LTS: Dubnium)
       v10.14.0   (LTS: Dubnium)
       v10.14.1   (LTS: Dubnium)
       v10.14.2   (LTS: Dubnium)
       v10.15.0   (LTS: Dubnium)
       v10.15.1   (LTS: Dubnium)
       v10.15.2   (LTS: Dubnium)
       v10.15.3   (LTS: Dubnium)
       v10.16.0   (LTS: Dubnium)
       v10.16.1   (LTS: Dubnium)
       v10.16.2   (LTS: Dubnium)
       v10.16.3   (LTS: Dubnium)
       v10.17.0   (LTS: Dubnium)
       v10.18.0   (LTS: Dubnium)
       v10.18.1   (LTS: Dubnium)
       v10.19.0   (LTS: Dubnium)
       v10.20.0   (LTS: Dubnium)
       v10.20.1   (LTS: Dubnium)
       v10.21.0   (LTS: Dubnium)
       v10.22.0   (LTS: Dubnium)
       v10.22.1   (LTS: Dubnium)
       v10.23.0   (LTS: Dubnium)
       v10.23.1   (LTS: Dubnium)
       v10.23.2   (LTS: Dubnium)
       v10.23.3   (LTS: Dubnium)
       v10.24.0   (LTS: Dubnium)
       v10.24.1   (Latest LTS: Dubnium)
        v11.0.0
        v11.1.0
        v11.2.0
        v11.3.0
        v11.4.0
        v11.5.0
        v11.6.0
        v11.7.0
        v11.8.0
        v11.9.0
       v11.10.0
       v11.10.1
       v11.11.0
       v11.12.0
       v11.13.0
       v11.14.0
       v11.15.0
        v12.0.0
        v12.1.0
        v12.2.0
        v12.3.0
        v12.3.1
        v12.4.0
        v12.5.0
        v12.6.0
        v12.7.0
        v12.8.0
        v12.8.1
        v12.9.0
        v12.9.1
       v12.10.0
       v12.11.0
       v12.11.1
       v12.12.0
       v12.13.0   (LTS: Erbium)
       v12.13.1   (LTS: Erbium)
       v12.14.0   (LTS: Erbium)
       v12.14.1   (LTS: Erbium)
       v12.15.0   (LTS: Erbium)
       v12.16.0   (LTS: Erbium)
       v12.16.1   (LTS: Erbium)
       v12.16.2   (LTS: Erbium)
       v12.16.3   (LTS: Erbium)
       v12.17.0   (LTS: Erbium)
       v12.18.0   (LTS: Erbium)
       v12.18.1   (LTS: Erbium)
       v12.18.2   (LTS: Erbium)
       v12.18.3   (LTS: Erbium)
       v12.18.4   (LTS: Erbium)
       v12.19.0   (LTS: Erbium)
       v12.19.1   (LTS: Erbium)
       v12.20.0   (LTS: Erbium)
       v12.20.1   (LTS: Erbium)
       v12.20.2   (LTS: Erbium)
       v12.21.0   (LTS: Erbium)
       v12.22.0   (LTS: Erbium)
       v12.22.1   (LTS: Erbium)
       v12.22.2   (LTS: Erbium)
       v12.22.3   (LTS: Erbium)
       v12.22.4   (LTS: Erbium)
       v12.22.5   (LTS: Erbium)
       v12.22.6   (LTS: Erbium)
       v12.22.7   (LTS: Erbium)
       v12.22.8   (LTS: Erbium)
       v12.22.9   (LTS: Erbium)
      v12.22.10   (LTS: Erbium)
      v12.22.11   (LTS: Erbium)
      v12.22.12   (Latest LTS: Erbium)
        v13.0.0
        v13.0.1
        v13.1.0
        v13.2.0
        v13.3.0
        v13.4.0
        v13.5.0
        v13.6.0
        v13.7.0
        v13.8.0
        v13.9.0
       v13.10.0
       v13.10.1
       v13.11.0
       v13.12.0
       v13.13.0
       v13.14.0
        v14.0.0
        v14.1.0
        v14.2.0
        v14.3.0
        v14.4.0
        v14.5.0
        v14.6.0
        v14.7.0
        v14.8.0
        v14.9.0
       v14.10.0
       v14.10.1
       v14.11.0
       v14.12.0
       v14.13.0
       v14.13.1
       v14.14.0
       v14.15.0   (LTS: Fermium)
       v14.15.1   (LTS: Fermium)
       v14.15.2   (LTS: Fermium)
       v14.15.3   (LTS: Fermium)
       v14.15.4   (LTS: Fermium)
       v14.15.5   (LTS: Fermium)
       v14.16.0   (LTS: Fermium)
       v14.16.1   (LTS: Fermium)
       v14.17.0   (LTS: Fermium)
       v14.17.1   (LTS: Fermium)
       v14.17.2   (LTS: Fermium)
       v14.17.3   (LTS: Fermium)
       v14.17.4   (LTS: Fermium)
       v14.17.5   (LTS: Fermium)
       v14.17.6   (LTS: Fermium)
       v14.18.0   (LTS: Fermium)
       v14.18.1   (LTS: Fermium)
       v14.18.2   (LTS: Fermium)
       v14.18.3   (LTS: Fermium)
       v14.19.0   (LTS: Fermium)
       v14.19.1   (LTS: Fermium)
       v14.19.2   (LTS: Fermium)
       v14.19.3   (LTS: Fermium)
       v14.20.0   (LTS: Fermium)
       v14.20.1   (LTS: Fermium)
       v14.21.0   (LTS: Fermium)
       v14.21.1   (LTS: Fermium)
       v14.21.2   (LTS: Fermium)
       v14.21.3   (Latest LTS: Fermium)
        v15.0.0
        v15.0.1
        v15.1.0
        v15.2.0
        v15.2.1
        v15.3.0
        v15.4.0
        v15.5.0
        v15.5.1
        v15.6.0
        v15.7.0
        v15.8.0
        v15.9.0
       v15.10.0
       v15.11.0
       v15.12.0
       v15.13.0
       v15.14.0
        v16.0.0
        v16.1.0
        v16.2.0
        v16.3.0
        v16.4.0
        v16.4.1
        v16.4.2
        v16.5.0
        v16.6.0
        v16.6.1
        v16.6.2
        v16.7.0
        v16.8.0
        v16.9.0
        v16.9.1
       v16.10.0
       v16.11.0
       v16.11.1
       v16.12.0
       v16.13.0   (LTS: Gallium)
       v16.13.1   (LTS: Gallium)
       v16.13.2   (LTS: Gallium)
       v16.14.0   (LTS: Gallium)
       v16.14.1   (LTS: Gallium)
       v16.14.2   (LTS: Gallium)
       v16.15.0   (LTS: Gallium)
       v16.15.1   (LTS: Gallium)
       v16.16.0   (LTS: Gallium)
       v16.17.0   (LTS: Gallium)
       v16.17.1   (LTS: Gallium)
       v16.18.0   (LTS: Gallium)
       v16.18.1   (LTS: Gallium)
       v16.19.0   (LTS: Gallium)
       v16.19.1   (LTS: Gallium)
       v16.20.0   (LTS: Gallium)
       v16.20.1   (LTS: Gallium)
       v16.20.2   (Latest LTS: Gallium)
        v17.0.0
        v17.0.1
        v17.1.0
        v17.2.0
        v17.3.0
        v17.3.1
        v17.4.0
        v17.5.0
        v17.6.0
        v17.7.0
        v17.7.1
        v17.7.2
        v17.8.0
        v17.9.0
        v17.9.1
        v18.0.0
        v18.1.0
        v18.2.0
        v18.3.0
        v18.4.0
        v18.5.0
        v18.6.0
        v18.7.0
        v18.8.0
        v18.9.0
        v18.9.1
       v18.10.0
       v18.11.0
       v18.12.0   (LTS: Hydrogen)
       v18.12.1   (LTS: Hydrogen)
       v18.13.0   (LTS: Hydrogen)
       v18.14.0   (LTS: Hydrogen)
       v18.14.1   (LTS: Hydrogen)
       v18.14.2   (LTS: Hydrogen)
       v18.15.0   (LTS: Hydrogen)
       v18.16.0   (LTS: Hydrogen)
       v18.16.1   (LTS: Hydrogen)
       v18.17.0   (LTS: Hydrogen)
       v18.17.1   (LTS: Hydrogen)
       v18.18.0   (LTS: Hydrogen)
       v18.18.1   (LTS: Hydrogen)
       v18.18.2   (LTS: Hydrogen)
       v18.19.0   (LTS: Hydrogen)
       v18.19.1   (LTS: Hydrogen)
       v18.20.0   (LTS: Hydrogen)
       v18.20.1   (LTS: Hydrogen)
       v18.20.2   (LTS: Hydrogen)
       v18.20.3   (LTS: Hydrogen)
       v18.20.4   (LTS: Hydrogen)
       v18.20.5   (Latest LTS: Hydrogen)
        v19.0.0
        v19.0.1
        v19.1.0
        v19.2.0
        v19.3.0
        v19.4.0
        v19.5.0
        v19.6.0
        v19.6.1
        v19.7.0
        v19.8.0
        v19.8.1
        v19.9.0
        v20.0.0
        v20.1.0
        v20.2.0
        v20.3.0
        v20.3.1
        v20.4.0
        v20.5.0
        v20.5.1
        v20.6.0
        v20.6.1
        v20.7.0
        v20.8.0
        v20.8.1
        v20.9.0   (LTS: Iron)
       v20.10.0   (LTS: Iron)
       v20.11.0   (LTS: Iron)
       v20.11.1   (LTS: Iron)
       v20.12.0   (LTS: Iron)
       v20.12.1   (LTS: Iron)
       v20.12.2   (LTS: Iron)
       v20.13.0   (LTS: Iron)
       v20.13.1   (LTS: Iron)
       v20.14.0   (LTS: Iron)
       v20.15.0   (LTS: Iron)
       v20.15.1   (LTS: Iron)
       v20.16.0   (LTS: Iron)
       v20.17.0   (LTS: Iron)
       v20.18.0   (LTS: Iron)
       v20.18.1   (Latest LTS: Iron)
        v21.0.0
        v21.1.0
        v21.2.0
        v21.3.0
        v21.4.0
        v21.5.0
        v21.6.0
        v21.6.1
        v21.6.2
        v21.7.0
        v21.7.1
        v21.7.2
        v21.7.3
        v22.0.0
        v22.1.0
        v22.2.0
        v22.3.0
        v22.4.0
        v22.4.1
        v22.5.0
        v22.5.1
        v22.6.0
        v22.7.0
        v22.8.0
        v22.9.0
       v22.10.0
       v22.11.0   (LTS: Jod)
       v22.12.0   (Latest LTS: Jod)
        v23.0.0
        v23.1.0
        v23.2.0
        v23.3.0
        v23.4.0
        v23.5.0

(2) Installation

1) Install the latest version

#Installing the latest version and execute the nvm install node command
nvm install node

Downloading and installing node v23.5.0...
Downloading /dist/v23.5.0/node-v23.5....
######################################################################### 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v23.5.0 (npm v10.9.2)
Creating default alias: default -&gt; node (-&gt; v23.5.0)

# Check what version is currently installed and execute the nvm list commandapple@xqdd nvm-0.40.1 % nvm list
-&gt;      v23.5.0
default -&gt; node (-&gt; v23.5.0)
iojs -&gt; N/A (default)
unstable -&gt; N/A (default)
node -&gt; stable (-&gt; v23.5.0) (default)
stable -&gt; 23.5 (-&gt; v23.5.0) (default)
lts/* -&gt; lts/jod (-&gt; N/A)
lts/argon -&gt; v4.9.1 (-&gt; N/A)
lts/boron -&gt; v6.17.1 (-&gt; N/A)
lts/carbon -&gt; v8.17.0 (-&gt; N/A)
lts/dubnium -&gt; v10.24.1 (-&gt; N/A)
lts/erbium -&gt; v12.22.12 (-&gt; N/A)
lts/fermium -&gt; v14.21.3 (-&gt; N/A)
lts/gallium -&gt; v16.20.2 (-&gt; N/A)
lts/hydrogen -&gt; v18.20.5 (-&gt; N/A)
lts/iron -&gt; v20.18.1 (-&gt; N/A)
lts/jod -&gt; v22.12.0 (-&gt; N/A)

       2) Installation and verification of the specified version

#Specify the installation of version 22
nvm install 22
Downloading and installing node v22.12.0...
Downloading /dist/v22.12.0/node-v22.12....
######################################################################### 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v22.12.0 (npm v10.9.0)

#Check the installed version and verify that the installation is successfulapple@xqdd nvm-0.40.1 % nvm list
-&gt;     v22.12.0
        v23.5.0
default -&gt; node (-&gt; v23.5.0)
iojs -&gt; N/A (default)
unstable -&gt; N/A (default)
node -&gt; stable (-&gt; v23.5.0) (default)
stable -&gt; 23.5 (-&gt; v23.5.0) (default)
lts/* -&gt; lts/jod (-&gt; v22.12.0)
lts/argon -&gt; v4.9.1 (-&gt; N/A)
lts/boron -&gt; v6.17.1 (-&gt; N/A)
lts/carbon -&gt; v8.17.0 (-&gt; N/A)
lts/dubnium -&gt; v10.24.1 (-&gt; N/A)
lts/erbium -&gt; v12.22.12 (-&gt; N/A)
lts/fermium -&gt; v14.21.3 (-&gt; N/A)
lts/gallium -&gt; v16.20.2 (-&gt; N/A)
lts/hydrogen -&gt; v18.20.5 (-&gt; N/A)
lts/iron -&gt; v20.18.1 (-&gt; N/A)
#Newly installedlts/jod -&gt; v22.12.0

Summarize

This is the article about the multi-version management of mac installation nvm(). For more related content on mac installation nvm multi-version management, please search for my previous articles or continue browsing the related articles below. I hope everyone will support me in the future!