How to update Node.js to the long term support version on Ubuntu 20.04?

update nodejs to 14.x

 sudo apt update
 curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -
 sudo apt install -y nodejs
 node -v
  • you should see: v14.15.0

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
source ~/.bashrc
nvm list-remote
nvm install v14.17.6

In last command choose the version you want to install from list shown in previous command.