How to update Node.js in ubuntu 20.04

Mário Batalha
1 min readJan 1, 2021

Hello everyone, a couple of days I wanted to update node in my machine,i try a lot of bunch things and i almost get crazy cuz nothing was working and then i was looking for something to solve my problem. After to figure it out i decided to write an article to help people that could find the same problem.

I used the following instructions to upgrade from Node.js version 10.12. 1 to 14.15.3

  1. Update all dependencies and update the package that need updating:
sudo apt update

2. Clear NPM’s cache:

sudo npm cache clean -f

3. Install a little helper called ‘n’

sudo npm install -g n

4. Install latest stable Node.js version

sudo n stable

With that last command you’ll update Node.js to the last stable version or LTS version. I really hope that this article had helped him out.

Sincerely Mario Batalha

Connect to my linkedin: MarioBatalha

--

--