Question: How do I install the latest [node.js](https://nodejs.org) on Ubuntu? I've been looking around, and I can't find anything. Is there a Ubuntu package for `node.js`, or do I have to compile it myself?

Answer: 
1. There is a `nodejs`-package in the official repositories (15.04). Consider also using `nodejs-legacy` for the `node` command.
2. to update to the latest version, use the `n` package installed via `npm`:

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

```

See [this SO question](https://stackoverflow.com/questions/15462700/nvm-or-n-or-something-else-to-upgrade-node-js) for a comparison of NVM and N.
I was recently installing a utility via NPM when I learned that my version of Node.js itself was out of date. No worries -- simply upgrade my Node.js install and move forward. Of course I could just hit nodejs.org and get the new image, but figured there had to be an easier way. It turns out there is -- you can [upgrade your local Node.js with NPM](http://theholmesoffice.com/node-js-fundamentals-how-to-upgrade-the-node-js-version/):

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

```

And adding to `PATH`, example (for Ubuntu)

```
echo "export NODE_PATH=$NODE_PATH:/usr/local/lib/node_modules" >> ~/.bashrc && source ~/.bashrc

```