macOSLinuxWindows

Where Does nvm Install Node Versions?

Where nvm and nvm-windows install Node versions on each OS, and the commands that print your live paths.

Last updated

nvm keeps each Node version in its own folder and points your shell at the active one. On macOS and Linux that is $NVM_DIR/versions/node (usually ~/.nvm), with global packages tucked inside each version folder. Switching versions never touches system directories.

Windows is a different tool wearing the same name. nvm-windows installs versions under its root folder (NVM_HOME, often %APPDATA%\nvm) and flips a symlink to select among them. Run nvm root on Windows or echo $NVM_DIR on Unix to stop guessing and read the live paths.

Where nvm stores this, by platform

macOS
~/.nvm/versions/node

Each version is a vX.Y.Z subfolder with its own global node_modules. Global installs belong to one version only: reinstall them after nvm install. Project .nvmrc files pin the expected version per repo.

Linux
~/.nvm/versions/node

Same layout as macOS. nvm-sh also works under WSL on Windows, where it uses this Linux path rather than the nvm-windows folders.

Windows
%APPDATA%\nvm

This is nvm-windows, a separate program from nvm-sh. Versions sit in versioned subfolders of the root shown by nvm root (settings.txt holds root and symlink). The NVM_SYMLINK path is what lands on PATH, not the version folders.

Frequently asked questions

Are nvm-sh and nvm-windows the same tool?

They are separate programs that share a name. nvm-sh runs on macOS and Linux (including WSL) and stores versions under $NVM_DIR. nvm-windows is a different codebase with its own settings.txt and symlink model. Guides for one do not apply to the other.

How does nvm-windows switch versions?

nvm-windows switches versions by retargeting a symlink (NVM_SYMLINK, often C:\Program Files\nodejs) at the chosen version folder. Run nvm root to see the versions directory and nvm list to see which one the symlink currently points at.

Notice an outdated path? Let us know.