Learn how to Replace Your Raspberry Pi to the Newest Raspbian OS

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

Update raspberry pi

Why do you need to update Raspbian?

Raspbian Buster was released in September 2019 and is based on Debian Buster. Several incremental updates were made. Python, Scratch, Sonic Pi, Java and other programming tools are preinstalled.

Raspbian itself contains a number of bundled tools, from the Chromium browser to several useful programming-based applications and utilities. There's Claws Mail, the LibreOffice suite, and Minecraft PE too!

Newer versions of Raspbian have been enhanced with a setup wizard and a recommended software tool. Improvements to the display have also been added, including pixel doubling for UHD displays. There is also support for booting the network over ethernet.

There are three ways to update Raspbian:

  1. Enter the command Raspberry Pi update in the terminal

  2. Perform a full upgrade from one version to another

  3. Flash a copy of the latest version

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

Update your Raspberry Pi with Raspbian

The easiest way to update Raspbian is in the terminal. Do this from the desktop menu or by pressing Ctrl + Alt + T..

Start the terminal to update Raspbian

First, update the repository package list:

sudo apt update

Then run the upgrade command:

sudo apt dist-upgrade

Follow all instructions and wait for the Pi to update. When you're done, enter:

Sudo suitably clean

This will discard unnecessary files that were downloaded as part of the upgrade. End with a restart:

restart sudo

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

Update Raspbian to the latest version (Stretch to Buster)

As already mentioned, Raspbian is based on Debian and follows the naming conventions of the higher-level distribution.

To upgrade Raspbian Stretch to Raspbian Buster, first upgrade and update to the latest 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 done simply in the terminal by editing the sources:

sudo nano /etc/apt/sources.list

Use the arrow keys to search the list until you find it

deb http://raspbian.raspberrypi.org/raspbian/ stretch main post not free RPI

Change this line and replace "Stretch" with "Buster":

deb http://raspbian.raspberrypi.org/raspbian/ Buster main post not free RPI

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

sudo apt-get remove apt-listchanges

This saves time when updating the operating system.

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

sudo apt update
sudo apt dist-upgrade

This will take a while so be patient. When you're done, use

sudo apt autoremove -y

to then discard old packages with changed dependencies

sudo apt autoclean

This clears the package cache, removes data that is no longer available for download, and saves space on your Raspberry Pi.

Reboot to complete the upgrade from Raspbian Stretch to Raspbian Buster.

restart sudo

Download and install Raspbian on the SD card

While the update is easy enough, you may have had enough of the old version of Raspbian that you were using. It might be hanging, the SD card might be damaged, or you might have bought a new SD card.

In either case, you need to install the latest version of Raspbian.

First, download the software for writing Etcher SD cards from balena.io/etcher. Next, visit the Raspberry Pi website download page and get a copy of Raspbian or Raspbian Lite. These can be downloaded directly from the website or as torrents.

Note that Raspbian Lite is a better option if you have a slow internet connection. (If you want an even lighter distribution, try DietPi.)

Diet pi raspi

Note that this option will erase the contents of your SD card. Make sure to back up any important data in your existing Raspbian installation before proceeding.

After downloading, extract the file to extract the IMG image. Then you can insert your SD card into the card reader of your PC and start Etcher. If the SD card is detected automatically, all you have to do is click choose picture and navigate to the IMG.

Update Raspbian by installing a fresh copy of the latest version

click lightning to continue and wait while the SD card is formatted and the Raspbian operating system is installed. When you're done, close Etcher and safely eject the SD card.

Insert it into your Raspberry Pi, start it up and enjoy all of the new features of Raspbian! Wondering what to do next? Check out our list of the best Raspberry Pi projects!

How to Install Raspbian OS Using NOOBS (Easier)

It can be a challenge to grapple with image files and write to microSD cards. Fortunately, there is an alternative that doesn't require you to install any additional software. Instead, just copy the installer to your SD card.

Raspberry Pi NOOBS software

This is NOOBS (New Out of the Box Software) which simplifies the installation of operating systems on your Raspberry Pi. Better still, it supports installing multiple operating systems and may give you a choice of:

  • Ubuntu MATE

  • OSMC


  • Windows 10 IoT Core

  • Raspbian and Raspbian Lite

  • …and many more

First, download NOOBS from the Raspberry Pi website. You can choose between the offline version or NOOBS Lite, which requires an internet connection.

Whichever option you choose after downloading it, all you need to do is unzip the contents and copy them to a formatted SD card. Then safely remove the card, insert it into a powered off Raspberry Pi, and power it on. A few moments later you will see the NOOBS menu where you can select Raspbian to install.


An alternative to NOOBS is BerryBoot. Both serve similar purposes – check out our NOOBS vs BerryBoot comparison to decide which is best for you.

You can even install Raspbian on a USB drive

Do you want to run the latest Raspbian Stretch from your USB drive instead of an SD card? This is possible if you have a Raspberry Pi 3 or higher. These devices allow you to copy the operating system to a connected USB device. Maybe a USB flash device or a hard drive or even an SSD.

While this requires the latest version of Raspbian, you don't necessarily have to start with a fresh installation. Instead, update Raspbian in the terminal as described above, then follow our tutorial: Booting a Raspberry Pi 3 from USB.

Ways to update Raspbian on your Raspberry Pi

In total, you have four options for updating your Raspberry Pi with a new version of Raspbian:

  1. Perform an update in the terminal

  2. Perform a new installation on the 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 updated Raspbian, you're ready to move on with your Raspberry Pi experience.

It is important that you keep your Raspbian installation up to date. Whether this means upgrading the terminal or reinstalling it every time is up to you.

Onyx Boox Note Air digital notebook and ereader

Onyx Boox Note Air Review: The Best 10.3-inch Ereader and Digital Notebook Ever

About the author

Christian Cawley
(1415 articles published)

Deputy Editor for Security, Linux, DIY, Programming and Technology explains. He also produces The Really Useful Podcast and has extensive desktop and software support experience.

Christian is an employee of Linux Format Magazine and a Raspberry Pi hobbyist, Lego lover and retro gaming fan.

More from Christian Cawley

Subscribe to our newsletter

Subscribe to our newsletter for tech tips, reviews, free e-books, and exclusive deals!

One more step …!

Please confirm your email address in the email we just sent you.

. "border =" 0

Leave a Reply

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