Upgrade Debian to the latest version

Stop critical services running on the host machine

systemctl stop XXX.service

Update the current running system to minimize the update gap :

apt update && apt full-upgrade

Remplace all occurrences of the old release (bookworm) with the new one (trixie) in the APT sources file :

sed -i 's/bookworm/trixie/g' /etc/apt/sources.list

Update the APT repository with the new packages list. You will get an estimate of the number of packages that will be upgraded.

apt update

Proceed with upgrading the packages. This step is the most time-consuming since it downloads the new packages. A list of important changes will be displayed, read it carefully. You can read through with Space and escape with Q. During the upgrade, you might be asked if you want to restart running services, you cant answer with Y.

apt full-upgrade

Once everything is up-to-date, restart the host :

reboot

After restarting

Confirm you are running the new OS version :

cat /etc/os-release

Post-install cleanup

Upgrade the source files to the new deb822 format, confirm with Y :

apt modernize-sources

List obsolete packages :

apt list '~o'

Attention, some packages installed outside official APT repos might be treated as obsolete. Double-check these carefully before purging obsolete packages :

apt purge '~o'
apt autoremove

Change Static IP Address

Enterprise Linux 9 / Raspberry Pi OS 12 :

sudo nmtui

Or

su

# list devices (ens192 used as example below)
nmcli device

# set [manual] for static setting or [auto] for DHCP
nmcli connection modify ens192 ipv4.method manual
nmcli connection modify ens192 ipv4.addresses xx.xx.xx.xx/24 
nmcli connection modify ens192 ipv4.gateway xx.xx.xx.1

# for multiple DNS, specify with space separated
nmcli connection modify ens192 ipv4.dns "xx.xx.xx.1 xx.xx.xx.2"

# restart the interface to reload settings
nmcli connection down ens192; nmcli connection up ens192

# confirm the applied settings
nmcli device show ens192

# confirm state
ip address show

Debian 12 :

su

ip a

nano /etc/network/interfaces

# restart the interface to reload settings
systemctl restart networking

# confirm state
systemctl status networking

Raspbian 10 / Raspberry Pi OS 11 :

sudo nano /etc/dhcpcd.conf