Upgrade da Debian Buster a Bullseye
| Attenzione questo articolo è ancora incompleto. Sentiti libero di contribuire cliccando sul tasto edit. |
it's recommended to upgrade openssh-server before upgrading the full system.
Start from “pure” Debian
The upgrade process described in this chapter has been designed for “pure” Debian stable systems. APT controls what is installed on your system. If your APT configuration mentions additional sources besides buster, or if you have installed packages from other releases or from third parties, then to ensure a reliable upgrade process you may wish to begin by removing these complicating factors.
Remove non-Debian packages
Below there are two methods for finding installed packages that did not come from Debian, using either aptitude or apt-forktracer. Please note that neither of them are 100% accurate (e.g. the aptitude example will list packages that were once provided by Debian but no longer are, such as old kernel packages).
$ aptitude search '?narrow(?installed, ?not(?origin(Debian)))' $ apt-forktracer | sort
Remove obsolete packages
It is a good idea to remove obsolete packages from your system before upgrading. They may introduce complications during the upgrade process, and can present security risks as they are no longer maintained.
- aptitude search '~o'
- aptitude purge '~o'
. Clean up leftover configuration files
A previous upgrade may have left unused copies of configuration files; old versions of configuration files, versions supplied by the package maintainers, etc. Removing leftover files from previous upgrades can avoid confusion. Find such leftover files with:
- find /etc -name '*.dpkg-*' -o -name '*.ucf-*' -o -name '*.merge-error'
The proposed-updates section
If you have listed the proposed-updates section in your APT source-list files, you should remove it before attempting to upgrade your system. This is a precaution to reduce the likelihood of conflicts.
Unofficial sources
If you have any non-Debian packages on your system, you should be aware that these may be removed during the upgrade because of conflicting dependencies. If these packages were installed by adding an extra package archive in your APT source-list files, you should check if that archive also offers packages compiled for bullseye and change the source item accordingly at the same time as your source items for Debian packages.
Check package status
Regardless of the method used for upgrading, it is recommended that you check the status of all packages first, and verify that all packages are in an upgradable state. The following command will show any packages which have a status of Half-Installed or Failed-Config, and those with any error status.
- dpkg --audit
aptitude search "~ahold"
dpkg --get-selections | grep 'hold$'
Make sure you have sufficient space for the upgrade
apt -o APT::Get::Trivial-Only=true full-upgrade
4.4.4. Minimal system upgrade
- apt upgrade --without-new-pkgs
- apt full-upgrade
Remove newly redundant or obsolete packages as described in Section 4.4.3, “Make sure you have sufficient space for the upgrade” and Section 4.8, “Obsolete packages”. You should review which configuration files they use and consider purging the packages to remove their configuration files. See also Section 4.7.1, “Purging removed packages”.