Debian 11 upgrade to Debian 12 bookworm

The developers of the distribution announced today the new major version Debian 12 bookworm. Currently ISOs have not been released for any net although we wouldn't recommend it.debian 11 bullseye

To upgrade your system it would be best to wait for version 12.1 which will be released next month. Why; Debian 12 comes June 10 but with some bugs.

But if you're not holding back like me, below we'll see how you can upgrade an existing Debian 11 installation.

First update Debian 11 fully and delete unneeded packages. Run them :

sudo apt update sudo apt upgrade sudo apt full upgrade sudo apt autoremove

Then we need to change the file /etc/apt/sources.list adding Debian 12 “bookworm” where it says “bullseye”.

Reboot and continue

If you want to change the repositories urls manually you should use the nano editor from the .
sudo /etc/apt/sources.list

But before opening nano you can do it easily with below command

sudo sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list

Now you can open the list to add a non-free-firmware that is needed.

The original Debian listing should look like:

deb http://deb.debian.org/debian/ bookworm main deb-src http://deb.debian.org/debian/ bookworm main deb http://security.debian.org/debian-security bookworm-security main deb-src http://security.debian.org/debian-security bookworm-security main deb http://deb.debian.org/debian/ bookworm-updates main deb-src http://deb.debian.org/ debian/ bookworm-updates main

At the first you should add the non-free-firmware , and so it will
done

deb http://deb.debian.org/debian/ bookworm main non-free-firmware

If you want you can add the non-free contribs as well. This is how it's gonna happen

deb http://deb.debian.org/debian/ bookworm main non-free-firmware contrib non-free

Let's start with the upgrade.

sudo apt update sudo apt full upgrade

Make coffee and wait for the upgrade process to finish. If you see the following image in the terminal press yes

confirmation

After completion do a reboot

sudo systemctl reboot

When the computer boots up check the Debian version with the command

cat /etc/debian_version

screenshot 2023 06 10 20 13 35

Of course it would be good to remove the old packages that are not needed

sudo apt --purge autoremove

iGuRu.gr The Best Technology Site in Greecefgns

every publication, directly to your inbox

Join the 2.087 registrants.
Debian 12

Written by giorgos

George still wonders what he's doing here ...

Leave a reply

Your email address is not published. Required fields are mentioned with *

Your message will not be published if:
1. Contains insulting, defamatory, racist, offensive or inappropriate comments.
2. Causes harm to minors.
3. It interferes with the privacy and individual and social rights of other users.
4. Advertises products or services or websites.
5. Contains personal information (address, phone, etc.).