Debian Upgrade
- Bookworm (12) to Trixie (13)
- https://www.debian.org/releases/trixie/release-notes/upgrading.en.html
Prep
Before upgrading, upgrade and repair existing problems:
apt-get update
apt-get upgrade
apt-get full-upgrade
apt-get autoremove --purge
dpkg -l | grep -v ^ii
apt list '?narrow(?installed, ?not(?origin(Debian)))'
apt-mark showhold
reboot
Sources
deb http://deb.debian.org/debian/ trixie main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian/ trixie main contrib non-free non-free-firmware
deb http://security.debian.org/debian-security trixie-security main contrib non-free non-free-firmware
deb-src http://security.debian.org/debian-security trixie-security main contrib non-free non-free-firmware
deb http://deb.debian.org/debian/ trixie-updates main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian/ trixie-updates main contrib non-free non-free-firmware
Upgrade
Notes:
- choose "yes" to restart services automatically
- keep existing configs as desired (usually Keep)
- let GRUB re-install to the boot disk if asked
apt-get update
apt-get upgrade --without-new-pkgs
apt-get full-upgrade
Check
Some upgrades change behaviour and need to be addressed prior to a reboot; for example Nginx configs have set the server_tokens off; setting by default in Trixie (13), which will lead to an error and a failure to restart - as the local config is now a duplicate:
nginx[45027]: [emerg] 45027#45027: "server_tokens" directive is duplicate in /etc/nginx/conf.d/security.conf:9
nginx[45027]: nginx: configuration file /etc/nginx/nginx.conf test failed
systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Fix the issues, e.g.:
$ vim /etc/nginx/conf.d/server.conf
#server_tokens off;
Re-run apt-get full-upgrade and the process will complete.
Reboot
reboot
Cleanup
Look for strays, "rc" tends to mean it can be purged (was to be removed, failed):
apt-get autoremove --purge
dpkg -l | grep -v ^ii
...
rc python 2.7.16-1 amd64
apt-get purge python
Look for installed packages not in the repo anymore (obsoleted):
apt list '~o'
apt purge '~o'
Look for stale/leftover configs from removed packages:
apt list '~c'
apt purge '~c'
Run a metadata clean on apt, it should show messages about deleting old index data, packages or other legacy data.
apt-get autoclean
The above is an example from a minimal install.
Index
- APT WhatProvides
- Apache wpadmin
- Arch Default Kernel
- Arch Kernel Order
- Bash Add fd
- Bash Dump History
- Bash Trim Whitespace
- CPU Stats
- CSS Reset
- DB2 Info
- Debian Upgrade
- Dell OpenManage
- Diff Lines
- Favicon Things
- Find Examples
- Forgejo Syntax Highlight
- Git Combine Repos
- Git Multi SSH
- Git Quickstart
- Git Rewrite User
- Gitea Mirror
- GitLab Anchors
- Glibc IPv4
- GnuPG Things
- IMAP Sync
- IPv4 Default Gateway
- IPv4 Default IP
- KRB5 Empty Keytab
- Kernel Boot Debug
- Kernel Decompress
- LUKS Encrypted Partitions
- Linux Valid Usernames
- Loopback FS
- MP3 Get Tags
- MX Tarpit
- Makefile Template
- Markdown Samples
- Mount OVA
- Mount qcow2
- MySQL Connections
- NFS 10G Tuning
- Netcat Replacements
- PAM Namespace
- Postfix Headers
- Proxmox Doodads
- RPM Info
- Radeon Temperature
- Recover Deleted ext3
- Recursive Unzip
- Roku Info
- SSH RSA Support
- SSL Certgen
- Samba OSX
- Server Notes
- Smem Datamash
- Split Disk
- systemd PID1
- TCP Kill
- Thunderbird LDAP AD
- uBlock Filters
- udev Hide Partitions
- Weechat Quickstart
- YTM to Textbox
- YUM Disablerepos
- SPDX-License-Identifier: CC-BY-SA-4.0
- SPDX-License-Identifier: MIT