Skip to main content

nvm 0.41.0

Release Date: November 4, 2026

The nvm project shipped version 0.41.0 on November 4, 2026, its first minor release since the 0.40.x line. The Node.js version manager, maintained by the nvm-sh organization, adds version selection by release category, persistent LTS aliases, and a broad round of shell-level hardening across its bash implementation. The release supersedes 0.40.8, which arrived on September 21, 2026.

What Changed

The headline feature set is small but practical. Users can now select versions by category, choosing among alpha, lts, non-lts, and iojs, and alpha builds are excluded by default. That changes the behavior of commands that previously swept every published version into their output.

Alias handling also gained state. nvm alias can now store --lts and --lts=<name>, and nvm records the LTS status of every installed Node.js version instead of inferring it on each call. Remotely listed versions are annotated with the node alias and any local aliases that point at them (PR #3920). A new helper, nvm_has_italics, detects terminal italics support through terminfo so formatting does not leak escape codes into terminals that cannot render them.

The Bug Fix List Is the Story

Most of the changelog is bug fixes, and several of them address problems that show up in long-running developer shells. nvm use no longer accumulates duplicate PATH entries in nested sessions (PR #3959), and the same command now handles regex-special characters inside $NVM_DIR (PR #3939). nvm no longer modifies or exports the caller's IFS, and a failed download no longer deletes the caller's TMPDIR.

Download and cache handling received attention as well. nvm_download_artifact only places an archive in the cache after its checksum passes, and the binary and source installers now refuse to use a tarball that did not come from that path. Credentials passed through NVM_AUTH_HEADER are supplied to curl and GNU Wget through a config file rather than a command line argument, are stripped of newlines so wrapped base64 values work, and are only sent to mirrors the header applies to.

Filesystem and path handling changes are numerous. Directory listings now include versions installed through symlinks, empty version directories are recognized even when they contain hidden files, Windows drive roots terminate upward searches instead of looping, and backslashes inside NVM_DIR survive filtering and path stripping.

Performance

A cluster of performance commits (PR #3949 and PR #3937) removes forks from hot paths. Version comparison avoids awk where possible, nvm_echo uses the printf builtin under zsh, OS detection reads /etc/os-release instead of calling uname -a, and npmrc scanning no longer spawns grep. Exact installed versions now resolve without a full nvm_ls pass, which shortens every nvm use in a shell prompt hook.

Why It Matters

nvm sits in the shell startup path on a great many developer machines, so shell hygiene fixes matter more than feature additions. The changes that stop PATH growth, preserve caller variables, and stop a symlinked .nvmrc from being printed or written through are the ones most likely to end silent, hard-to-diagnose bugs. The LTS status recording also makes alias resolution more predictable when Node.js moves an active line into long-term support.

How to Upgrade

Installed copies update with git -C "$NVM_DIR" fetch --tags origin followed by git -C "$NVM_DIR" checkout v0.41.0 and a reload of the shell profile. Fresh installs can use the install script at the v0.41.0 tag. The install script itself got fixes for commented-out profile lines (PR #3860), for writing $HOME only when NVM_DIR sits inside it (PR #3962), and for avoiding a Windows npm under WSL (PR #3966).

The full changelog is published at the nvm-sh/nvm repository under the v0.41.0 tag, with sections for new behavior, bug fixes, refactors, robustness, performance, documentation, and tests.

Other Versions

We use cookies for ads and analytics.