Updating Raspbian

Published by Tobias Hofmann on

1 min read

Raspbian is based on Debian. Upgrading it to the latest version is done the same way as upgrading a normal Debian distribution. To not make this my shortest blog ever, I’ll show how I upgrade one of my Raspberry Pi.

The upgrade to release N is performed by starting the process release N-1. For each upgrade:

  1. Update current release
  2. Prepare configuration for next release
  3. Run upgrade
  4. Clean up
  5. Validate result of upgrade

Update your current Raspbian

sudo apt-get update
sudo apt full-upgrade

Prepare configuration for next Raspbian version

Edit repository files and change the distribution name to stretch or buster, depending from where you are upgrading from. A list of releases for Raspbian can be found at the Wikipedia page.

sudo vim /etc/apt/sources.list

To update to stretch:

sources.list:

deb http://archive.raspbian.org/raspbian stretch main contrib non-free rpi

To update to buster:

sources.list:

deb http://archive.raspbian.org/raspbian buster main contrib non-free rpi

Note

You may have more repository servers configured. For instance, check the content of the file: /etc/apt/sources.list.d/raspi.list.

Make sure to enable IPv6 support.

Acquire::ForceIPv4 "false";

Run upgrade

sudo apt update
sudo apt dist-upgrade

Sample output for update to stretch

Sample output for update to buster

Clean up

sudo apt autoremove

Validate result of upgrade

After running the above commands again, they should not report any more updates or dependencies.

sudo apt dist-upgrade

Check Debian version

more /etc/os-release

The entries for version and codename should now match your targeted release. For buster, it is:

VERSION_ID=”10”
VERSION_CODENAME=buster
Let the world know

Tobias Hofmann

Doing stuff with SAP since 1998. Open, web, UX, cloud. I am not a Basis guy, but very knowledgeable about Basis stuff, as it's the foundation of everything I do (DevOps). Performance is king, and unit tests is something I actually do. Developing HTML5 apps when HTML5 wasn't around. HCP/SCP user since 2012, NetWeaver since 2002, ABAP since 1998.

1 Comment

NGINX with RTMP on Raspberry Pi as a streaming server for OBS | It`s full of stars! · January 30, 2020 at 10:43

[…] for that architecture, the RTMP module is available for Debian buster. If you are not on buster, consider upgrading Raspbian. It’s easier to install software via apt than having to compile it […]

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.