DEV Community

Hellen Namulinda
Hellen Namulinda

Posted on

Updating node to the latest version

At times, when you install node using the command
sudo apt-get install nodejs, a lower version is installed.
E.g when you type
nodejs --version
It shows
0.10.26

Therefore, to update node to the latest stable version, use n module from npm. The following commands help.

sudo npm cache clean -f
sudo npm install -g n
sudo n stable
Enter fullscreen mode Exit fullscreen mode

Top comments (0)