How to update node to any version using npm

Recently i wanted to upgrade my node to 0.11.10 for some company work, but when i Google it i did not found anything relevant to my query. I have solved it using NPM commands and here is simple tutorial about it.

These commands are tested in Ubuntu 14.04 with NPM installed

I hope you have NPM installed, if not then do it using sudo apt-get install npm. You can update to any version using node helper (n). Here how to update node to any version using npm.

First of all clean the NPM cache. You can do this using.

sudo npm cache clean -f

Install node helper (n) globally using following command.

sudo npm install -g n

Once node helper is installed. You can either get the latest stable version using

sudo n stable

Or if you want specific version like i needed 0.11.10 then you can do this using.

sudo n 0.11.10

After upgrade you can check the latest version of node using node –version or node -v.

Shahid (UnixRoot) Shaikh

Hey there, This is Shahid, an Engineer and Blogger from Bombay. I am also an Author and i wrote a programming book on Sails.js, MVC framework for Node.js.

Related Posts


  1. hah, thank you for this, I was trying to set up a diff laptop that had an old dev stuff on it…

    ONE THING BTW! you have a typo and need to add a space in the ‘sudo npm install -g n’ 😉

    You’re a rockstar for this article!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.