skip to content
Keshav Mohta

How to update node in ubuntu

/ 1 min read

update node in ubuntu

Terminal window
> sudo apt purge nodejs npm

then install curl

Terminal window
> sudo apt install curl

install nvm: check for latest version on nvm page

Terminal window
> curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

reload bash

“sh

source ~/.bashrc

install nvm
```sh
> nvm install node

it will download latest node js version

set latest as default

Terminal window
> nvm alias default node