Apt
Update
## update /etc/apt/sources.list sudo apt-get update sudo apt-get check sudo apt-get upgrade sudo apt-get -s upgrade sudo apt-get -u upgrade sudo apt-get dist-upgrade sudo apt-get -s dist-upgrade sudo apt-get -u dist-upgrade sudo apt-get clean sudo apt-file update
Search
apt-cache search foo
File Search
apt-file update apt-file search tcl.h
Recovery
apt-get install -f dpkg --configure -a
Debian Upgrade: Bullseye(11) to Bookworm(12)
https://www.debian.org/releases/bookworm/amd64/release-notes/ch-upgrading.html
https://www.debian.org/releases/bookworm/amd64/release-notes/ch-information.html
## Start from pure Debian cat /etc/debian_version lsb_release -a apt-forktracer sudo apt install gpgv dpkg --audit #dpkg --get-selections | grep 'hold$' apt-mark showhold
## Preparing Source List cd /etc/apt cat sources.list | sed 's/^/#/g' | sudo tee sources_bullseye.list cat sources.list | sed 's/^/#/g' | sed 's/bullseye/bookworm/g' | sudo tee sources_bookworm.list cat sources_bookworm.list | sed 's/^#//g' | sudo tee sources.list
cd /etc/apt/sources.list.d for i in *.list ; do cat ${i} | sed 's/^/#/g' | sudo tee ${i%.list}_bullseye.list cat ${i} | sed 's/^/#/g' | sed 's/bullseye/bookworm/g' | sudo tee ${i%.list}_bookworm.list cat ${i%.list}_bookworm.list | sed 's/^#//g' | sudo tee ${i} done
## Upgrading Packages sudo apt update sudo apt -o APT::Get::Trivial-Only=true full-upgrade
sudo apt upgrade --without-new-pkgs sudo apt full-upgrade
Available Options for Configuration Files:
- Install the Package Maintainer's Version
- Original configuration file is copied with post-fix '.ucf-old' to the same location
- Keep the Local Version Currently Installed (Default)
- Possible safest way
## Preparing for the Next Release sudo apt list '~c' sudo apt purge '~c'
Debian Upgrade: Buster(10) to Bullseye(11)
https://www.debian.org/releases/bullseye/amd64/release-notes/ch-upgrading.html
https://www.debian.org/releases/bullseye/amd64/release-notes/ch-information.html
## Start from pure Debian cat /etc/debian_version lsb_release -a apt-forktracer dpkg --audit dpkg --get-selections | grep 'hold$'
## Preparing Source List cd /etc/apt cat sources.list | sed 's/^/#/g' | sudo tee sources_buster.list cat sources.list | sed 's/^/#/g' | sed 's/buster/bullseye/g' | sed 's/\/updates/-security/g' | sudo tee sources_bullseye.list cat sources_bullseye.list | sed 's/^#//g' | sudo tee sources.list
cd /etc/apt/sources.list.d for i in *.list ; do cat ${i} | sed 's/^/#/g' | sudo tee ${i%.list}_buster.list cat ${i} | sed 's/^/#/g' | sed 's/buster/bullseye/g' | sudo tee ${i%.list}_bullseye.list cat ${i%.list}_bullseye.list | sed 's/^#//g' | sudo tee ${i} done
## Upgrading Packages sudo apt update sudo apt -o APT::Get::Trivial-Only=true full-upgrade
sudo apt upgrade --without-new-pkgs sudo apt full-upgrade
Available Options for Configuration Files:
- Install the Package Maintainer's Version
- Original configuration file is copied with post-fix '.ucf-old' to the same location
- Keep the Local Version Currently Installed (Default)
- Possible safest way
- New configuration file is stored with post-fix '.ucf-dist' to the same location
## Preparing for the Next Release dpkg -l | awk '/^rc/ {print $2}' sudo apt purge $(dpkg -l | awk '/^rc/ {print $2}')
Troubleshooting - Missing Link to systemd-timesyncd.service
https://unix.stackexchange.com/questions/758100/in-debian-bullseye-does-systemd-timesyncd-check-for-other-ntp-daemons
https://tracker.debian.org/news/1115332/accepted-systemd-2454-2-source-amd64-into-unstable-unstable/
https://wiki.archlinux.org/title/systemd-timesyncd
systemctl list-unit-files
## UNIT FILE STATE VENDOR PRESET ## dbus-org.freedesktop.timesync1.service bad enabled
- Debian Bullseye(11) has adopted Chrony as the default NTP service
- Debian Buster(10) used another NTP-related package systemd-timesyncd conflicting with Chrony
- The systemd-timesyncd package has been removed in this update process, but some files are not purged
#sudo apt purge systemd-timesyncd sudo rm -f /etc/systemd/system/dbus-org.freedesktop.timesync1.service #sudo rm -f /etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service
References
Acknowledgments
Daiphys is a professional-service company for research and development of leading-edge technologies in science and engineering.
Get started accelerating your business through our deep expertise in R&D with AI, quantum computing, and space development; please get in touch with Daiphys today!
Daiphys Technologies LLC - https://www.daiphys.com/