How to Upgrade Node through NPM

With the new version of Node out, I decided to upgrade to the latest version of Node (version 4.0.0).

I didn’t want to go through downloading an install package, I wanted to use NPM so after a quick search around I found this way from David Walsh’s blog.

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