How to install nodejs on Ubuntu 13.10+
Based on: • http://askubuntu.com/questions/507684/trying-to-install-yeoman-on-ubuntu-to-use-with-nodejs-and-npm • http://stackoverflow.com/questions/16151018/npm-throws-error-without-sudo/24404451#24404451
sudo ls # prime sudo with use password
sudo npm ls -gp | awk -F/ '/node_modules/ && !/node_modules.*node_modules/ {print $NF}' | sudo xargs npm -g rm
sudo apt-get --purge remove nodejs
manually fix any node environment PATH variable in ~/.bashrc ~/.bash_aliases ~/.profile &/or ~/.zshrc
manually install to ~/.nvm per: https://github.com/creationix/nvm
git clone https://github.com/creationix/nvm.git ~/.nvm && cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`
. ~/.nvm/nvm.sh
nvm install stable
#alternatively: nvm install 4.4.3