Useful NVM commands

Just some commands that I always have to lookup. NVM is a tool that manages your node versions. An important concept is that your node versions are installed into their own directories together with the packages that are installed by this version of node. So if you install another version of node, you have to install all the global packages.

Update node version and install the global packages from your previous version of node:

nvm install v10.14.2 --reinstall-packages-from=v10.14.1

List all installed versions of node:

nvm ls

List all LTS remote versions of node:

nvm ls-remote --lts

Set a specific version of node to the default version:

nvm alias default v10.18.1

Remove a version:

nvm uninstall v12.16.2
Tag: | Category: