Keeping your Raspberry Pi up-to-date

Before installing anything it's always good practise to make sure the Raspberry Pi software itself ( collectively known as Raspbian ) is absolutely up-to-date. Often when you get a problem, it can be due to bugs in old versions of software that have long since been fixed. We'll often ask you to update Raspbian as a first point of call when helping you solve a problem, but this guide will teach you how to stay one step ahead!

To update your Pi, just follow the steps below:

Step 1: Verify connectivity

First, make sure a Network Cable is plugged in and the Pi has an internet connection. You can verify this by browsing to Google.com ( or anywhere really ) in the browser.

Step 2: Get to a Terminal

If you have just turned on the Raspberry Pi and you are looking at a black screen with white text, you're at the Terminal and can continue.

If you are looking at a desktop, you need to locate LXTerminal, the mostly-black icon that looks like a monitor, and double-click it. A new window should pop up ( it may take a moment ) and this is the Terminal.

Step 3: Perform the update ( the easy way )

Type the following command to run our updater from get.pimoroni.com:

curl https://get.pimoroni.com/uptodate | bash

This will prompt you if you need to reboot, make sure your work is saved and answer Y for yes!

Step 3: Perform the update ( the hard way + explanation )

Type the following commands, one after the other, waiting for them to complete at each step:

sudo apt-get update
sudo apt-get upgrade
sudo reboot

Warning: This article previously recommended installing and running "rpi-update." Don't do this unless you absolutely have to. rpi-update will install potentially broken, unstable or experimental firmware onto your Raspberry Pi and could have unexpected or undesirable results.

These commands will update everything and then restart the Raspberry Pi.

The first command, sudo apt-get update, will update all the package indexes. This command doesn't actually update any software on your Pi, but updates what the latest software is and where to download it from. "update" usually takes a minute or two while it downloads the latest package lists.

The next command, sudo apt-get upgrade, actually performs upgrades of software on your Raspberry Pi. It will generally tell you how much it needs to download and how much extra space is required before asking you if you want to continue. It can also take several minutes, or sometimes longer depending on how long ago you last upgraded and how fast your internet connection is.

Occasionally the packaged "raspberrypi-bootloader" will be updated. This will include a new "firmware" update for your Raspberry Pi which replaces the kernel with a new, stable release. You can obtain cutting-edge releases of the kernel and firmware with "rpi-update," but we absolutely recommend avoiding this command unless you're entirely sure of the potential consequences ( rendering your Pi a broken, unbootable and difficult to fix mess ) if there's a problem with the firmware.

The "sudo reboot" command reboots your Pi so it can start up with the shiny new firmware ( if it has been updated ), you can wait until you next turn off your Pi naturally but you need to reboot before everything will be properly up to date.

Shopping basket

Need something for this project? You can use the links below to add products to your Pimoroni Shop basket for easy checkout.

Raspberry Pi 3 with Pibow Case
Rainbow £44.00
Raspberry Pi 3 with Pibow Case
Ninja £44.00
Raspberry Pi 3 with Pibow Case
Ninja Coupé £40.00
Raspberry Pi 3 with Pibow Case
Coupé £40.00
Want to checkout or change something? Click here to view your cart.

Tutorial
Beginner
Raspberry Pi

Phil Howard

phil@pimoroni.com
@gadgetoid
Phil is Pimoroni's software guru, instantly recognisable by his somewhat pirate-themed moustache growing attempts. Usually found buried neck deep in Python libraries, he's also been known to escape on occasion and turn out crazy new products. If you need a helping hand, he's a prolific Twitter user and rampages around the forums like a T-Rex. Ask him if you need help with Pimoroni's software libraries, or Propeller HAT.