How to Upgrade Raspberry Pi Operating System from Bullseye to Bookworm

Sometimes, for various reasons, we need to upgrade the system, such as when the old version is no longer maintained, has many vulnerabilities, or some software requires the latest version of the system.
If there are no important software and data in the current system, the simplest way is to format the SD card and then download the new version of the system from the official website to re-burn it. However, if you have been using it for a long time and have a lot of data that is not easy to back up or migrate, we need to perform an upgrade.
Here, we will demonstrate how to upgrade from bullseye to bookworm as an example:
bookworm is the latest system for Raspberry Pi.
How to Upgrade Raspberry Pi Operating System from Bullseye to Bookworm
First, check the current system version:
lsb_release -a
How to Upgrade Raspberry Pi Operating System from Bullseye to Bookworm
My version here is bullseye.
First, modify the apt source to switch to bookworm.
Update two files:
How to Upgrade Raspberry Pi Operating System from Bullseye to Bookworm
sudo sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list
How to Upgrade Raspberry Pi Operating System from Bullseye to Bookworm
sudo sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list.d/raspi.list
Then update the apt software list.
sudo apt update -y
After updating, execute the following command to upgrade the system.
sudo apt full-upgrade -y
Of course, the upgrade process is not unattended; you need to confirm some operations. During the upgrade process, just select yes or Y for all interactions.
How to Upgrade Raspberry Pi Operating System from Bullseye to Bookworm
After the upgrade is complete, we restart the Raspberry Pi, and the system will be the latest bookworm version.

Leave a Comment