Just a quick blog for me since I have multiple server running debian 10.
The upgrade need to be done on a root account aka superuser.
Backup your data!!!
Before upgrading please backup your data. unless you like to play a russian roullete, and also have a backup server that auto backups everything u.u
Update Currently Installed Packages
Before upgrading, it is recommended to update the currently installed packages.
Packages marked as held back cannot be automatically installed, upgraded or removed. This may cause issues when upgrading to debian 11. To check wich package are held back, run the following command:
If there are
on hold packages, you should unhold the packages with
apt-mark unhold pkg_name.
Refresh the packages index and upgrade all installed packages:
apt update apt upgrade
apt full-upgrade to perform a major version upgrade of the installed packages and may remove some unnecessary packages:
Remove the automatically installed dependencies that are no longer needed:
Upgrade Debian 10 Buster to Debian 11 Bullseye
Reconfigure APT’s source-list files.
You can either open the
/etc/apt/sources.list file with your text editor and replace each instance of
bullseye-security. If you have other source list files under
/etc/apt/sources.list.d, you need update those sources too.
The default file
/etc/apt/sources.list should look something like this:
deb [arch=amd64] http://ftp.ca.debian.org/debian/ buster main deb-src [arch=amd64] http://ftp.ca.debian.org/debian/ buster main deb [arch=amd64] http://ftp.ca.debian.org/debian/ buster-updates main deb-src [arch=amd64] http://ftp.ca.debian.org/debian/ buster-updates main deb [arch=amd64] http://security.debian.org/ buster/updates main deb-src [arch=amd64] http://security.debian.org/ buster/updates main
Update it so it looks something like this:
deb [arch=amd64] http://ftp.ca.debian.org/debian/ bullseye main deb-src [arch=amd64] http://ftp.ca.debian.org/debian/ bullseye main deb [arch=amd64] http://ftp.ca.debian.org/debian/ bullseye-updates main deb-src [arch=amd64] http://ftp.ca.debian.org/debian/ bullseye-updates main deb [arch=amd64] http://security.debian.org/debian-security/ bullseye-security main deb-src [arch=amd64] http://security.debian.org/debian-security/ bullseye-security main
Alternatively, instead of manualy editing the files you can use the use the
sed -i 's/buster/bullseye/g' /etc/apt/sources.list sed -i 's/buster/bullseye/g' /etc/apt/sources.list.d/*.list sed -i 's#/debian-security bullseye/updates# bullseye-security#g' /etc/apt/sources.list
Step half way one
If you used
sed you may notice that if you run
apt update you will get an error message.
E: The repository 'http://security.debian.org./debian-security bullseye/updates Release' does not have a Release file.
The offending lines are this:
deb http://security.debian.org/debian-security/ bullseye/updates main deb-src http://security.debian.org/debian-security/ bullseye/updates main
bullseye/updates”, is where the error is. Change those two lines to look like this:
deb http://security.debian.org/debian-security/ bullseye-security main deb-src http://security.debian.org/debian-security/ bullseye-security main
Update the packages index.
Set the terminal output to English only:
Update the bad boy:
apt update apt upgrade
You may be asked if you want to restart or whether you want to keep an existing configuration file or to install the package maintainer’s version. Read the information carefully, and if you didn’t make any custom changes to the file, it is safe to type
Y; otherwise, to keep the current configuration, enter
The upgrade may take some time, depending on the number of updates and your Internet speed.
apt full-upgrade, which will perform a complete upgrade of the system, install the newest versions of packages, and resolve dependency changes between packages in different releases. This will upgrade all packages that was not upgraded with the previous command.
The command may install some new packages and remove conflicting and obsolete packages.
After thats done, clean up the unnecessary packages with:
Finally, reboot your machine so that the new kernel is activated by typing:
systemctl reboot # or reboot
Confirm the Upgrade
Wait for a few moments until your system boots up and log in.
You can check the Debian version by using the
root@sandbox:/home/urmom# lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 11 (bullseye) Release: 11 Codename: bullseye
Thats it! gtfo and enjoy your new Debian 11.