Everywhere All articles Download Buy — $19

Where apps hide your files

Which Node.js your Mac runs, and where

Updated 2026-10-28 · 6 min read

Node can live in /usr/local/bin, the Homebrew folder or ~/.nvm, depending on how you installed it. Two Terminal commands show which copy runs and where it lives.

Ask Node where it is

Run these two commands. Both only read:

which -a node
node -p "process.execPath"

The first lists every node on your PATH, in search order. The second prints the real file of the one that runs, with symlinks resolved. The path tells you how Node was installed:

PathInstalled by
/usr/local/bin/nodeThe installer package (.pkg) from nodejs.org, or an Intel Homebrew
/opt/homebrew/bin/nodeHomebrew on Apple silicon
~/.nvm/versions/node/v22.x.x/bin/nodenvm (the folder name is the version)

Whichever comes first is the one that runs. With several installed, the order of your PATH decides. The nodejs.org package and an Intel Homebrew both want /usr/local/bin/node, so ls -l /usr/local/bin/node settles which one owns it: a link into Cellar is Homebrew's, a plain file is the package's.

The nodejs.org installer

The .pkg from nodejs.org writes into /usr/local, and its receipt on the Mac used for this guide lists what it put there:

/usr/local/bin/node
/usr/local/bin/corepack
/usr/local/include/node/
/usr/local/lib/node_modules/corepack/
/usr/local/share/doc/node/
/usr/local/share/man/man1/node.1

npm comes from a second receipt (org.nodejs.npm.pkg) and installs /usr/local/lib/node_modules/npm. The links /usr/local/bin/npm and /usr/local/bin/npx point into it, but neither receipt lists them, so a file list from pkgutil misses them. The package installs as root. If npm install -g then fails with a permissions (EACCES) error, npm's own docs recommend a version manager such as nvm, or pointing npm's prefix at a folder you own, rather than sudo.

To list exactly what the installer wrote for your version, which only reads the receipt:

pkgutil --files org.nodejs.node.pkg
pkgutil --pkg-info org.nodejs.node.pkg

The second prints the installed version and install time. There is no uninstaller. To remove a package install, use the list from pkgutil --files (plus the npm and npx links above) and move those items to the Trash from Finder, taking care with the shared folders /usr/local/bin and /usr/local/lib/node_modules: remove only the Node entries inside them, never the folders themselves.

nvm

nvm keeps each version in its own folder inside ~/.nvm:

~/.nvm/versions/node/v22.22.1/bin/node

That is the layout on the Mac used for this guide, which has four versions side by side. The active one comes from a line the nvm installer adds to your shell config (the nvm README shows it as export NVM_DIR="$HOME/.nvm" followed by a line that sources $NVM_DIR/nvm.sh). Useful read-only commands once nvm is loaded: nvm ls lists installed versions and nvm which 20 prints the path of one. Because nvm is a shell function that nvm.sh loads, not a program, a command run outside your shell, such as an app launched from the Dock, does not see it.

Each nvm version has its own global packages, in ~/.nvm/versions/node/<version>/lib/node_modules. Deleting an old version folder removes that version and its global packages with it. Use nvm uninstall <version> rather than deleting by hand, and note the packages you want to reinstall first.

Homebrew

brew install node puts Node in Homebrew's Cellar and links it into the prefix. On Apple silicon the prefix is /opt/homebrew; on an Intel Mac it is /usr/local. To get the exact folder:

brew --prefix node

Like any brew --prefix, it prints a path even for a formula that is not installed, so check with brew list --versions node first. On the Mac used for this guide, an Intel Homebrew has /usr/local/Cellar/node/21.7.3 and /usr/local/opt/node pointing at it, but /usr/local/bin/node is the package's file, so that Homebrew Node is not the one that runs. Versioned formulae such as node@22 are keg-only in Homebrew: they are not linked into bin, so they are not on PATH until you add them. Use brew uninstall node to remove it; Homebrew refuses if another package depends on it.

Which chip is Node built for?

Node can be a native or an Intel build. Run node -p "process.arch": it prints arm64 or x64. To see what the file itself contains, run file "$(command -v node)". nvm downloads the build that matches what uname -m reports, so versions installed from a Terminal running under Rosetta are Intel-only. On the Mac used for this guide, whose shell runs under Rosetta, all four nvm versions are x86_64 files while the nodejs.org binary is universal. An x64 Node on Apple silicon works through Rosetta, but native add-ons built for one architecture will not load in the other.

Global packages and caches

npm root -g prints where npm install -g puts packages for the Node you are using. For the pkg install this is /usr/local/lib/node_modules, which is where it was for the system-wide Node here, holding folders such as npm and corepack; for nvm it is inside the version's folder. npm config get prefix prints the prefix those paths hang from.

Per-project packages are in a node_modules folder inside the project. Deleting it is safe in the usual sense: npm install rebuilds it from package.json, as long as you have network access and a lock file you trust.

Why a normal search misses Node

/usr/local, ~/.nvm and /opt/homebrew are folders Finder and Spotlight searches skip or hide, and node is a plain file with no extension that shares its name with thousands of node_modules folders.

Finding every Node on the disk

Type node into Everywhere and the results flood with node_modules entries, so type something more specific: npm-cli.js lists one hit per copy of npm, which usually means one per Node install, and a version such as v22.22 finds nvm's folder for it. Check the folder column to see which install each hit belongs to, then press ⌘T to open Terminal in that folder. It matches names only, not the version inside the binary, and hidden folders like ~/.nvm are included without extra setup.

Common questions

Where is Node.js installed on a Mac?

Run node -p "process.execPath". The nodejs.org installer uses /usr/local/bin/node, Homebrew on Apple silicon uses /opt/homebrew, and nvm uses ~/.nvm/versions/node/<version>/bin/node.

Where does npm install global packages on a Mac?

Run npm root -g. For the nodejs.org installer it is /usr/local/lib/node_modules; for nvm it is inside the version's folder under ~/.nvm.

How do I uninstall Node.js from a Mac?

For nvm use nvm uninstall <version>; for Homebrew use brew uninstall node. The nodejs.org package has no uninstaller: list its files with pkgutil --files org.nodejs.node.pkg, add the npm and npx links in /usr/local/bin, and move only those items to the Trash.

Why does my Mac have two different Node versions?

Several installs can coexist, and the order of PATH decides which runs. which -a node lists them all in order.

Find any file before you finish typing

Everywhere keeps track of every file on your Mac — including the folders Spotlight hides and drives you have unplugged. Free for a day, then $19 once.

Version 2.20.3 · macOS 13+ · 4.7 MB · notarised

Related

© 2026 Caretopia Network Private Limited Everywhere for Mac Buy a licence Articles Privacy Support