nvm uninstall
Uninstall one or more versions of Node.js.
Aliases: rm, un
Usage
Usage: nvm uninstall (rm,un) <version> ... [flags]
Arguments
| Argument | Required | Description |
|---|---|---|
<version> ... | Yes | One or more version specifiers. Resolved before uninstall. |
Flags
| Flag | Short | Description |
|---|---|---|
--purge | Remove matching cached download artifact(s) for each uninstalled version. |
Internal automation flag --notify exists in source and is hidden from help.
Examples
# uninstall exact version
nvm uninstall 20
# uninstall multiple versions in one call
nvm uninstall 20 18
# uninstall and purge cache for the same version
nvm uninstall 20.19.1 --purge
# uninstall via alias
nvm alias add oldlts 18.20.8
nvm uninstall oldlts
Sample output
Removed Node.js v20.19.1
Purged cached artifact for v20.19.1
Verified transcript (local run)
PS> nvm uninstall --help
Usage: nvm uninstall (rm,un) <version> ... [flags]
Uninstall one or more Node.js versions.
Flags:
--purge Purge the cache of this version (if cached).
Notes
- You can uninstall multiple versions in one command.
- Use
--purgewhen you want both runtime and artifact cleanup. - If uninstalling the active default, set another default with
nvm use.