Alert: This answer is for MacOS only
Let suppose you have 2 versions of nodeJS inside your nvm, namely v13.10.1 & v15.4.0
And, v15.4.0 is default
> nvm list
v13.10.1
-> v15.4.0
system
default -> 15.4.0 (-> v15.4.0)
And, you want to switch the default to v13.10.1
Follow these steps on your Mac terminal:
Run the command:
nvm alias default 13.10.1
This will make the default point to v13.10.1 as...
default -> 13.10.1 (-> v13.10.1)
node -v
You will get...
v13.10.1
nvm list will also show the new default version.
nvm list
Just an info: The NodeJS versions taken as example above will have their different npm versions. You can cross-verify it in terminal by running npm -v