DIY Linux

How to Update Your Raspberry Pi to the Latest Raspbian OS

Christian Cawley Updated 10-02-2020

Need to update your Raspberry Pi to the latest version of Raspbian, but can’t work out how to do it? Here are four ways to get the latest Raspbian on your own device right now!


Why You Need to Update Raspbian

Released in September 2019, Raspbian Buster is based on Debian Buster and has had several incremental updates. It has Python, Scratch, Sonic Pi, Java, and more programming tools preinstalled.

Raspbian itself comes with a bunch of bundled tools, from the Chromium browser to several useful programming-based applications and utilities. There’s also Claws Mail, the LibreOffice suite, and not to mention Minecraft PE!

Recent versions of Raspbian have been enhanced with a setup wizard, along with a recommended software tool. Display tweaks have also been added, including Pixel Doubling for UHD displays. There’s also support for network booting over Ethernet.

There are three ways to update Raspbian:

  1. Enter the Raspberry Pi update command in the terminal
  2. Run a complete upgrade from one version to another
  3. Flash a copy of the latest release

Below we’ll look at the options for each. The following steps work for all consumer versions of the Raspberry Pi, including the Pi Zero and Raspberry Pi 4.


Update Your Raspberry Pi With Raspbian

The simplest way to update Raspbian, is in the Terminal. Do this via the desktop menu, or by pressing Ctrl + Alt + T.

Launch the terminal to upgrade Raspbian

Begin by updating the repository package list:

sudo apt update

When this is done, run the upgrade command:

sudo apt dist-upgrade

Follow any prompts and wait for the Pi to be upgraded. When you’re done, type:

sudo apt clean

This will discard any unneeded files that have been downloaded as part of the upgrade. Finish by restarting:

sudo reboot

When your Raspberry Pi has restarted, you’ll be using the latest version of Raspbian. Well done!

Update Raspbian to the Latest Version (Stretch to Buster)

As noted, Raspbian is based on Debian and follows the parent distro’s naming conventions.


To upgrade Raspbian Stretch to Raspbian Buster, start by updating and upgrading to the most recent packages.

sudo apt update

sudo apt dist-upgrade -y

Next, the firmware should be updated with:

sudo rpi-update

Upgrading to Raspbian Buster means switching repositories. This is easily done in the terminal by editing the sources:

sudo nano /etc/apt/sources.list

Use the arrow keys to browse through the list until you find

deb stretch main contrib non-free rpi

Change this line, replacing “stretch” with “buster”:

deb buster main contrib non-free rpi

Press Ctrl+X to save and exit, then remove a large changelog file:

sudo apt-get remove apt-listchanges

This will save time when the operating system updates.

With the sources updated you can run a full package update and upgrade:

sudo apt update

sudo apt dist-upgrade

This will take a while to complete, so be patient. When done, use

sudo apt autoremove -y

to discard old packages with changed dependencies, then

sudo apt autoclean

This clears the package cache, removing data no longer available for download, and saving space on your Raspberry Pi.

To complete the upgrade from Raspbian Stretch to Raspbian Buster, reboot.

sudo reboot

How to Download and Install Raspbian to SD Card

While updating is simple enough, you might have had enough of the old version of Raspbian you were using. Perhaps it has been hanging, or the SD card has become corrupted, or you’ve bought a new SD card.

Either way, you need to install the most recent version of Raspbian.

Get started by downloading the Etcher SD card writing software from Next, head to the Raspberry Pi website’s download page, and grab a copy of Raspbian or Raspbian Lite. These can be downloaded direct from the website, or as torrents.

Note that if you have a slow internet connection, Raspbian Lite is the better option. (If you want an even lighter distro, try DietPi Need a Lightweight Raspberry Pi Distro? Try DietPi! Raspbian Lite is the most popular lightweight Raspberry Pi distro but is it the best? Learn about the popular alternative, DietPi. Read More .)

Be aware that this option will delete the contents of your SD card. Be sure to back up any vital data from within your existing Raspbian installation before proceeding.

After downloading, unzip the file to unpack the IMG disk image. You can then insert your SD card into your PC’s card reader and launch Etcher. With the SD card automatically detected, all you need to do is click Select image and browse to the IMG.

Update Raspbian by installing a fresh copy of the latest version

Click Flash to proceed and wait while the SD card is formatted and the Raspbian OS is installed. When you’re done, close Etcher, then safely eject the SD card.

Insert it in your Raspberry Pi, boot up and enjoy all the new features of Raspbian! Wondering what to do next? Check our list of the best Raspberry Pi projects 26 Awesome Uses for a Raspberry Pi Which Raspberry Pi project should you start with? Here's our roundup of the best Raspberry Pi uses and projects around! Read More !

How to Install Raspbian OS With NOOBS (Easier)

Getting to grips with image files and writing to microSD cards can be a bit challenging. Fortunately, there is an alternative that doesn’t require you to install additional software. Instead, you simply copy the installer to your SD card.

Raspberry Pi NOOBS software

This is NOOBS (New Out Of the Box Software), designed to make installing operating systems on your Raspberry Pi easier. Better still, it supports installation of multiple OSs, potentially giving you a choice of:

  • Ubuntu MATE
  • OSMC
  • Windows 10 IoT Core
  • Raspbian and Raspbian Lite
  • …and many more

To get started, download NOOBS from the Raspberry Pi website. You have a choice of the offline version, or NOOBS Lite, which requires an internet connection.

Whichever you choose, once downloaded, you simply need to unzip the contents, and copy to a formatted SD card. Once this is done, safely remove the card, insert it in a powered-off Raspberry Pi, and power it up. A few moments later, you’ll see the NOOBS menu, where you can select Raspbian to be installed.


An alternative to NOOBS is BerryBoot. Both fulfil similar purposes—check our NOOBS vs. BerryBoot NOOBS vs. BerryBoot: Which Is Best for Installing a Raspberry Pi OS? Want to install a Raspberry Pi operating system without messing around with image files and SD card writing programs? It's easy with NOOBS and BerryBoot... but which option is best? Read More comparison to decide which is best for you.

You Can Even Install Raspbian to a USB Drive

Want to run the latest Raspbian Stretch from your USB drive instead of an SD card? This is possible if you own a Raspberry Pi 3 or later. These devices allow you to copy the operating system to a connected USB device. Perhaps a USB flash device, or a HDD, or even an SSD.

While this will require the latest version of Raspbian, you don’t necessarily need to start with a fresh install. Instead, upgrade Raspbian in the terminal as explained above, then follow our tutorial: booting a Raspberry Pi 3 from USB How to Make Raspberry Pi 3 Boot From USB The Raspberry Pi is a versatile piece of kit, capable of a diverse range of tasks. But it has one glaring flaw: the inability to boot from USB. Until now, that is. Read More .

Ways to Update Raspbian on Your Raspberry Pi

In total, you have four ways to update your Raspberry Pi with a fresh version of Raspbian:

  1. Run an update within the terminal
  2. Do a fresh install onto SD card
  3. For the easy option, use NOOBS to install Raspbian
  4. Don’t want to rely on an SD card? Boot from USB!

It really is as simple, or as advanced, as you need it to be. Once you’ve upgraded Raspbian, you’ll be ready to proceed with your Raspberry Pi experience.

It’s vital that you keep your Raspbian installation up to date 5 Reasons to Update Your Raspberry Pi and Raspbian Regularly Lagging behind on Raspberry Pi updates can cause a lot of frustrations in the long run. Read More . Whether this means upgrading in the terminal, or creating a fresh installation each time, is up to you.

Related topics: Raspberry Pi, Raspbian.

Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.

Whatsapp Pinterest

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Anu Varde
    February 13, 2020 at 2:28 pm

    Is it necessary to change stretch to buster in both these sources?
    /etc/apt/sources.list and /etc/apt/sources.list.d/raspi.list.
    You only mention sources.list but mentions both lists.

  2. Diane Trefethen
    December 31, 2018 at 1:51 am

    I just upgraded my Raspbian Stretch on my Pi or at least I think I did.
    How can one tell?

    In Terminal, I ran both cat /etc/os-release and cat /etc/rpi-issue and the output was exactly the same both before and after the “update” and “dist-upgrade”.

    The output for cat /etc/rpi-issue is Raspberry Pi reference 2018-06-27

    Thank you for any guidance.

  3. Paul Woolard
    August 31, 2018 at 8:50 am

    Very timely article given that I about to upgrade from Jessie. However will running 'sudo apt dist-upgrade' upgrade my Pi to Stretch or just to the latest version of Jessie?

  4. John
    August 7, 2018 at 9:25 pm

    Very informative. Thank You