Last Updated: February 25, 2016
·
783
· magalhini

Upgrading node.js from within NPM

There's an easy and clean way to upgrade your node.js version without having to download the newest package - via npm itself!

sudo npm cache clean -f
sudo npm install -g n
sudo n stable

Then check is everything went as expected:

node -v

Credits to David Walsh: http://davidwalsh.name/upgrade-nodejs