Skip to content

Instantly share code, notes, and snippets.

@jose8a
Last active August 29, 2015 14:04
Show Gist options
  • Save jose8a/281ec5493c99b9e4d76a to your computer and use it in GitHub Desktop.
Save jose8a/281ec5493c99b9e4d76a to your computer and use it in GitHub Desktop.
How to Upgrade NodeJS ... e.g. as after a vulnerability/security patch
From: http://davidwalsh.name/upgrade-nodejs
Install n helper module via npm:
npm install n
Then do the following:
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
The n package represents a Node helper, and running the last command upgrades node to the latest stable version. Instead of using "stable", you could specify a desired version:
sudo n 0.8.21
Once your install is complete, you can confirm you version with another command:
node -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment