---
title: "Upgrade Raspberry Pi OS from Buster to Bullseye"
date: "2023-05-11T13:07:58Z"
lastmod: "2023-05-11T13:07:58Z"
authors:
  - "utzer"
tags:
  - "armhf"
  - "Bullseye"
  - "Buster"
  - "debian"
  - "linux"
  - "RaspberryPi"
  - "Raspbian"
categories:
  - "Linux"
  - "RaspberryPi"
canonical_url: "https://newblog.utzer.de/2023/05/11/upgrade-raspberry-pi-raspbian-from-buster-to-bullseye/"
---

So to upgrade Raspbian, as it was previously called, from Buster to Bullseye went smooth an easy, I tried this with some Pi2B (armhf 32Bit) and with a Pi4. These two are headless systems, so I don't know if this works well for any systems with window managers.

Better run these commands in screen, so when the SSH connection is interrupted you can reconnect and resume your work.

**Edit: For the update there is a culprit, it will cause a problem with dhcpd, so before the reboot 13. (was point 12. before I added the remark below) please [check this post](/?p=141).**

Steps to update:

1. sudo apt update
1. sudo apt dist-upgrade -y
1. sudo rpi-update
1. sudo reboot
1. sudo apt remove libc6-dev
1. Edit the file /etc/apt/sources.list, change all occurrences of _buster_ to _bullseye_.
1. Edit the file /etc/apt/sources.list.d/raspi.list, change all occurrences of _buster_ to _bullseye_.
1. sudo apt update
1. sudo apt install libgcc-8-dev gcc-8-base
    - Instead of _sudo apt install_ better use my [update script](/2020/04/20/debian-based-full-updates-in-one-command/), just run _~/up "libgcc-8-dev gcc-8-base"_ (incl. the "quotation marks") and skip steps 8., 9., 10. and 11. It doesn't matter when you already executed step 8..
1. sudo apt dist-upgrade
1. sudo apt autoclean
1. Please edit the file /etc/systemd/system/dhcpcd.service.d/wait.conf, change the path in there from /usr/lib/dhcpcd5/dhcpcd to /usr/sbin/dhcpcd, see [here](/?p=141) for long version.
1. sudo reboot

Somewhere along the way there will be a warning that "libc6-dev" can not be upgrade (or so) as it breaks "libgcc-8-dev", this is the reason for step 5. and 9..

Edit: On the Pi4 I got:

```
The following packages have unmet dependencies:
 libgcc1 : Depends: gcc-8-base (= 8.3.0-6+rpi1) but 8.4.0-7+rpi1 is to be installed
```

Which I solved by "sudo apt-get remove libgcc1" and then I just restarted with either point 8. from above, but in my case with "~/up libgcc-8-dev".

I prefer to update or install packages with [this script](/2020/04/20/debian-based-full-updates-in-one-command/).

first inspiration from [here](https://gnulinux.ch/raspberry-pi-os-von-buster-auf-bullseye-upgraden).

