Where Does nodenv Store Node Versions?
nodenv keeps every Node version in ~/.nodenv/versions with shims in ~/.nodenv/shims, and per-project pins in .node-version files.
Last updated
nodenv follows the rbenv playbook for Node: versions live side by side under ~/.nodenv/versions, and tiny shims in ~/.nodenv/shims route node, npm, and npx to the right one. Your shell picks the version per directory through .node-version files. The shims folder must sit early on PATH, and nodenv init wires that plus shell completion in one step.
The global default sits in ~/.nodenv/version, a one-line file. Project pins override it by proximity, so walking up the tree explains any surprise. Rehash after installs so new binaries get their shims.
Where nodenv stores this, by platform
~/.nodenv/versions
One folder per installed Node version plus shims, plugins, and the global version file. Per-project .node-version files in repos select versions automatically when you cd in.
~/.nodenv/versions
Identical layout to Linux. Homebrew installs still use this home-based tree rather than the Cellar, so upgrades never orphan your versions.
Frequently asked questions
Which Node version is active here?
Run nodenv versions to list installed ones and nodenv version to show the resolved pick for the current folder. The resolution walks up from the current directory through .node-version files to the global version file.
How do I remove a Node version?
Delete the version folder under versions, or run nodenv uninstall. Then run nodenv rehash so the shims stop pointing at the removed binaries.
Notice an outdated path? Let us know.