Uninstall Node.js with the version manager, installer, or package manager that owns it. Use nvm uninstall VERSION or fnm uninstall VERSION for one managed release, brew uninstall node for that Homebrew formula, or Windows Settings → Apps → Installed apps for an MSI installation.
Removing one Node version does not require deleting all npm caches, global tools, or manager configuration. Identify the active installation first, then choose one matching route below. If you only need a newer runtime, follow how to update Node.js instead.
Pre-flight: find out how Node was installed
Record the runtime and npm locations before removing anything:
node --version
node -p "process.execPath"
npm prefix -g
npm config get cache
npm ls -g --depth=0On macOS/Linux, type -a node can reveal multiple shell resolutions. On Windows use where.exe node or PowerShell's Get-Command node -All. In PowerShell, plain where is an alias for Where-Object, not the executable lookup command.
A path is a clue, not complete proof of ownership. For example, C:\Program Files\nodejs may be an installer directory or a version-manager symlink. Confirm the manager before deleting it. Preserve a list of global tools you may want to reinstall; do not share .npmrc files that may contain registry tokens.
Method by install type (quick table)
| Installed through | Remove one Node installation | What to inspect first |
|---|---|---|
| nvm, macOS/Linux | nvm uninstall VERSION | nvm ls; switch away from the version being removed |
| fnm | fnm uninstall VERSION | fnm list; select another version first |
| nvm-windows | nvm uninstall VERSION | nvm list; this is a separate project from Unix nvm |
| Homebrew | brew uninstall node or the installed node@MAJOR formula | brew list --formula |
| Windows MSI | Installed apps → Node.js → Uninstall | Exact installed application |
| winget | winget uninstall --id OpenJS.NodeJS.LTS --exact for the LTS package | winget list; Current uses a different ID |
| Debian/Ubuntu | sudo apt remove nodejs | Review the proposed dependency removals |
| Fedora/RHEL family | sudo dnf remove nodejs | Review the transaction before confirming |
| Volta or n | Use the manager-specific notes below | Distinguish removing Node from removing the entire toolchain |
VERSION is a placeholder: replace it with an installed version. Do not copy all the table's commands into one script.
Uninstall a version manager (nvm, fnm, Volta, n)
Remove one version with nvm
Use nvm's documented commands to list versions and switch away from the target before uninstalling it:
nvm ls
nvm use 24
nvm uninstall 22.11.0Here, 24 must already be installed, and 22.11.0 is an example of the release you intend to remove. Keep the manager's shell initialization if you are keeping nvm. Update any default alias or project .nvmrc that still points to the removed version.
To remove nvm itself and all managed versions, first inspect the actual NVM_DIR, back up anything needed, then follow the README's uninstall section. Do not recursively delete an unchecked environment-variable path.
Remove one version with fnm
fnm list
fnm use 24
fnm uninstall 22.11.0Again, substitute versions from your list. Removing the fnm program is separate: use its original installer, such as brew uninstall fnm or winget uninstall --id Schniz.fnm --exact. Remove the fnm env shell hook only if you are removing the manager. The fnm command reference lists its supported operations.
Volta
Do not delete ~/.volta just to update Node or change a project's runtime. It holds the whole Volta toolchain, including installed tools and shims. For a complete Volta removal, inspect VOLTA_HOME, back up what you need, and follow the official uninstall instructions, including shell or Windows environment changes. Volta's project currently marks itself unmaintained, so factor migration into future toolchain work.
n
With n, distinguish cached releases from the active installed runtime. The n documentation describes n rm VERSION for cached releases and n uninstall for the active Node installation. Use the required permissions for your configured prefix. Removing the npm package n by itself does not uninstall every Node file it installed.
Uninstall the nodejs.org installer on macOS
Homebrew and the Node .pkg installer are different routes. If Homebrew owns the installation, use Homebrew instead of manually deleting files from its prefix.
For an old .pkg installation, inspect package receipts and actual file ownership before removing files:
pkgutil --pkgs | grep -i nodeFor each relevant Node installer receipt, inspect it with pkgutil --files RECEIPT_ID, replacing the placeholder with the exact receipt ID. Confirm that listed files have not since been replaced by another installer or manager. Remove only confirmed Node-owned files after backing up any global packages you need.
pkgutil --forget RECEIPT_ID removes a receipt record; it does not uninstall its files. Do not delete all of /usr/local/lib/node_modules simply because a generic uninstall snippet names it. That directory may contain tools shared with another Node installation.
Uninstall on Windows
For a standard MSI installation, open Settings → Apps → Installed apps, choose Node.js, and uninstall it. With winget, identify the installed package first:
winget list --name Node.jsThen use the matching ID. For the LTS package:
winget uninstall --id OpenJS.NodeJS.LTS --exactFor Current, the package ID is OpenJS.NodeJS. Chocolatey users should likewise remove the package they actually installed. Do not run every variant blindly.
If nvm-windows manages the runtime, use its version-removal command. To remove nvm-windows itself, use its uninstaller. Do not hand-delete its active symlink as though it were an independent MSI installation.
Open a new terminal and inspect PATH after removal. Keep %AppData%\npm if another Node installation still uses those global command shims; deleting it is optional cleanup, not a required uninstall step.
Uninstall via OS package managers
Choose the command for your package manager:
# Debian/Ubuntu
sudo apt remove nodejs# Fedora/RHEL-family installation managed by dnf
sudo dnf remove nodejs# Homebrew's unversioned formula
brew uninstall nodeA versioned Homebrew formula needs its exact name, such as node@24. Review dependent packages before confirming removals. If Homebrew says another tool requires Node, decide whether to keep that dependency or remove the dependent tool; do not bypass the dependency check merely to silence the message.
Removing a third-party repository definition, purging system configuration, and running autoremove are separate decisions. None is required just to remove one runtime package. A distribution may package npm separately, so inspect it separately too.
Remove a Docker Node image
A Node image is separate from the Node runtime on your host. Inspect its users before removing it:
docker ps -a --filter ancestor=node:24-alpine
docker image inspect node:24-alpineIf it is no longer needed and no retained container depends on it, docker image rm node:24-alpine removes that local image tag. Do not delete containers or volumes merely to remove a cached image: volumes can hold application data. Rebuilding a Dockerfile with the same FROM line can download the image again.
The leftover-files checklist (the part everyone skips)
Cleanup is optional and installation-specific:
- npm cache: inspect the path recorded by
npm config get cache; other installations may share it. - Global packages and shims: inspect the recorded global prefix and package list before removing anything.
.npmrc: preserve settings or credentials you still need. Removing Node does not require deleting this file.- Version-manager data: removing it can delete every managed runtime and tool, not just Node's active version.
- Shell initialization: remove only hooks for managers you actually removed. A stale PATH directory alone does not print an error; a startup command invoking a missing executable can.
- Project files: source code, lockfiles, and project directories are not uninstall leftovers.
Verify Node is fully gone
In a new macOS/Linux terminal:
command -v node
command -v npm
command -v npxIn PowerShell:
Get-Command node,npm,npx -All -ErrorAction SilentlyContinueNo result means no matching command is available through that shell's resolution path, not proof that every file on disk was removed. If another Node appears, inspect its executable and owner before deciding whether to remove it. If you intentionally kept a version manager or another runtime, that result may be expected.
FAQ
Usually no. Use the current installer or version manager to upgrade, then verify the active runtime and test the project. Full removal is a separate task.
No. It removes the selected installed release. Switch away from it first and keep the manager initialization if other versions remain.
Normal package or version-manager removal does not delete your source projects. Broad manual cleanup commands can remove unrelated tools or data, which is why each directory should be inspected separately.
Another installation may be earlier on PATH, or the shell may have cached a location. Open a new terminal and inspect all matches before deleting anything else.
See also
Sources
Authoritative references this article was fact-checked against.
- Node.js downloads (official, nodejs.org)nodejs.org
- nvm (Node Version Manager) READMEgithub.com
- fnm (Fast Node Manager) READMEgithub.com
- Volta documentation (how Volta works)docs.volta.sh





