Upgrading Debian systems
Pre-upgrade
Check everything is currently up to date
Check all packages are at their current versions:
N.B. If there's a kernel upgrade, probably worth rebooting into the new kernel at this stage.
If salt is being used to manage, check that states are currently correct (nothing to apply):
Remove any outdated/non-upgradable packages
Check for non-Debian and obsolete packages that are installed and decide whether to keep or remove them:
Check aptitude does not have any pending actions, by running aptitude
in a terminal and pressing 'g'.
Check package status
The following command will show any packages which have a status of Half-Installed or Failed-Config, and those with any error status.
Check for any packages that are on hold. If there are any and they are essential for the upgrade, the upgrade will fail:
Upgrade
Change the sources
Replace the "old" distribution names in /etc/apt/sources.list
with the new one.
Do the upgrade
At this point you have to fix any package issues that arrise during the upgrade.
For example, going from strech (9) to buster (10) I hit this bug with salt-master: #919231 - CacheDirectory/StateDirectory does not change owner/group and had to run chown -R salt:salt /var/lib/salt/pki/master /var/cache/salt/master
to work-around.
Similarly, Icinga2 changed its Certificate Paths: (see: Upgrading Icinga 2)
Changed Certificate Paths
The default certificate path was changed from /etc/icinga2/pki to /var/lib/icinga2/certs.
Old Path New Path /etc/icinga2/pki/icinga2-agent1.localdomain.crt /var/lib/icinga2/certs/icinga2-agent1.localdomain.crt /etc/icinga2/pki/icinga2-agent1.localdomain.key /var/lib/icinga2/certs/icinga2-agent1.localdomain.key /etc/icinga2/pki/ca.crt /var/lib/icinga2/certs/ca.crt
Post-upgrade
Reinstall new versions of any non-Debian packages that were removed pre-upgrade.
Remove any packages no longer required:
Check for any newly-obsoleted packages:
Search for removed packages that still have configuration files on the system:
If you're happy with the list then these can be purged:
(optional) Find any configuration files that differ from the package maintainer's version and tidy them up: