Check version:
node -v
Using N
Install n package:
sudo npm install -g n
Choose stable node release:
sudo n stable
Choose latest node release:
sudo n latest
Choose latest LTS node release
sudo n lts
Using NVM
nvm install node --reinstall-packages-from=node
List installed versions of node: (via nvm)
nvm list
-> v6.14.4
v14.17.5
v16.8.0
Switch version of node:
nvm use v14.17.5
Check version again:
node -v