Node Version Manager
Updating Node.js can be a pain in the ass but, thanks to nvm, this process is as easy as two command lines. Check out official site for more info.
Installation
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
The script clones the nvm repository to ~/.nvm and adds the source line to your profile (~/.bash_profile, ~/.zshrc, ~/.profile, or ~/.bashrc).
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
Usage
Download the latest node:
nvm install node
List of all node versions:
nvm ls-remote
Install a specific node version:
nvm install v8.1.4
nvm use v8.1.4