Notes

Install/Upgrade Node.js on Raspberry Pi (Raspbian Jessie)

The Node.js version that comes pre-installed with Raspbian Jessie is old. If you check the version using node -v, it’ll give you v0.10.29. The latest ARM-version of Node.js as of this writing is v4.2.1. Let’s remove the old and install the latest version available on our Raspberry Pi

Edit on GitHub

Raspberry Pi

tl;dr

Run this one command in Terminal:

1curl raw.githubusercontent.com/aamnah/bash-scripts/master/install_nodejs.sh | bash

This will automatically run a script i wrote that takes care of removing existing Node.js stuff, downloading and installing the latest version, and cleaning up afterwards. It also confirms the Node.js version once the installation is done.


The Node.js version that comes pre-installed with Raspbian Jessie is old. If you check the version using node -v, it’ll give you v0.10.29. The latest ARM-version of Node.js as of this writing is v4.2.1. Let’s remove the old and install the latest version available on our Raspberry Pi.

Remove existing Node.js

Run the following commands one by one:

1sudo apt remove -y nodered
2sudo apt remove -y nodejs nodejs-legacy
3sudo apt remove -y npm

Install latest Node.js ARM-release

Download:

1wget https://node-arm.herokuapp.com/node_latest_armhf.deb

Install:

1sudo dpkg -i node_latest_armhf.deb

That’s it, you now have the latest Node.js version available for the Raspberry Pi. You can confirm the version using node -v.

Re-install Node-RED

We uninstalled Node-RED as part of removing Node. If you want to re-install it, you can do so by running the following command:

1sudo apt update && sudo apt install -y nodered

source