How to upgrade Raspbian Buster (10) to Bullseye (11)

Placeholder image

Luiz

Aug 25, 2021

Debian 11 Bullseye has been released and with it many updated packages (python 3.9 as default per example). To upgrade a Raspbian to bullseye the first thing to be done is a backup, please backup your system and do not proceed without it.

  1. Upgrade the system and packages to the latest

Before changing the version to Bullseye it is good to already upgrade all packages. This can be achieved with the following process:

sudo apt update

You might see a message saying that the version has changed from stable to oldstable, in this case, is necessary to accept the change running:

sudo apt update --allow-releaseinfo-change

Now proceed with the upgrade

sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get full-upgrade

During the process the changelog will be presented, to close it type :q.

Then, there will be a question to allow restarting the services during the upgrade, better answer yes otherwise you might be asked several times.

And, there is a possibility of getting questions about config files, to keep the existing version or replace it, I always keep the existing version to avoid breaking changes.

After the conclusion, restart the system: sudo reboot

  1. Upgrading to Raspbian 11 Bullseye.

The first step is to change the apt source list to use bullseye instead of buster: sudo vim /etc/apt/sources.list

Then change it from buster to bullseye, mine look like this:

deb http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi

Now, repeat the process to update the package list and upgrade the system/packages:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get full-upgrade
sudo reboot

This concludes the upgrade process. There is an optional step to clean the unused packages running sudo apt autoremove, but be careful, review the package list and only remove if you are sure nothing depends on those packages.

Tags