Upgrade the current bookworm installation to the latest packages.
apt update && apt upgrade && apt dist-upgrade && apt clean && echo OK |
Perform some cleanup
apt --purge autoremove
apt autoclean
|
Perform database sanity and consistency check.
Fix any output from this command.Check for any packages which are held back.
Record current package status.
dpkg --get-selections '*' > /root/packages.txt
|
Review and remove any obsolete packages
apt list '?obsolete'
apt purge '?obsolete'
|
Review and remove any obsolete config files
apt list '?config-files'
apt purge '?config-files'
|
Generate upated SSH key (likely not necessary, check in /etc/ssh/)
If running MariaDB, shut it down
Point apt to the trixie sources.
mv /etc/apt/sources.list /etc/apt/sources.list.debian12
cat << EOF >> /etc/apt/sources.list.d/debian.sources
Types: deb
URIs: https://deb.debian.org/debian
Suites: trixie trixie-updates
Components: main non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
Types: deb
URIs: https://security.debian.org/debian-security
Suites: trixie-security
Components: main non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
EOF
|
Update the package cache.
apt update && apt clean && echo OK
|
Perform the upgrade, downloading packages in advance.
apt full-upgrade -d -y && echo OK
apt full-upgrade -y && apt clean && echo OK
|
Reboot.
Perform some cleanup