How to upgrade node.js on Debian and Ubuntu?


#1

How to upgrade node.js on Debian and Ubuntu?

To upgrade node.js to the newest version on Debian or Ubuntu, try the following commands.

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

sudo ln -sf /usr/local/n/versions/node/<VERSION>/bin/node /usr/bin/node 

Source: http://askubuntu.com/a/480642/596735


#2