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.
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
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:
1apt update 2apt 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:
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:
1deb [arch=amd64] http://ftp.ca.debian.org/debian/ buster main 2deb-src [arch=amd64] http://ftp.ca.debian.org/debian/ buster main 3 4deb [arch=amd64] http://ftp.ca.debian.org/debian/ buster-updates main 5deb-src [arch=amd64] http://ftp.ca.debian.org/debian/ buster-updates main 6 7deb [arch=amd64] http://security.debian.org/ buster/updates main 8deb-src [arch=amd64] http://security.debian.org/ buster/updates main
Update it so it looks something like this:
1deb [arch=amd64] http://ftp.ca.debian.org/debian/ bullseye main 2deb-src [arch=amd64] http://ftp.ca.debian.org/debian/ bullseye main 3 4deb [arch=amd64] http://ftp.ca.debian.org/debian/ bullseye-updates main 5deb-src [arch=amd64] http://ftp.ca.debian.org/debian/ bullseye-updates main 6 7deb [arch=amd64] http://security.debian.org/debian-security/ bullseye-security main 8deb-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
1sed -i 's/buster/bullseye/g' /etc/apt/sources.list 2sed -i 's/buster/bullseye/g' /etc/apt/sources.list.d/*.list 3sed -i 's#/debian-security bullseye/updates# bullseye-security#g' /etc/apt/sources.list
If you used
sed you may notice that if you run
apt update you will get an error message.
1E: The repository 'http://security.debian.org./debian-security 2bullseye/updates Release' does not have a Release file.
The offending lines are this:
1deb http://security.debian.org/debian-security/ bullseye/updates main 2deb-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:
1deb http://security.debian.org/debian-security/ bullseye-security main 2deb-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:
1apt update 2apt 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:
Wait for a few moments until your system boots up and log in.
You can check the Debian version by using the
1root@sandbox:/home/urmom# lsb_release -a 2No LSB modules are available. 3Distributor ID: Debian 4Description: Debian GNU/Linux 11 (bullseye) 5Release: 11 6Codename: bullseye
Thats it! gtfo and enjoy your new Debian 11.