Тема: apt
-
Обновление Debian и Ubuntu до следующего основного выпуска с сохранением возможности отката
И do-release-upgrade в Ubuntu, и ручная процедура Debian с изменением списка источников и последующим обновлением предполагают наличие полной резервной копии и резервного доступа через консоль на случай обрыва SSH-соединения во время обновления; сами примечания к выпуску Debian рекомендуют сначала выполнить минимальное обновление, а затем полное.
-
Современное добавление стороннего репозитория APT: файлы deb822 .sources и наборы ключей Signed-By
apt-key устарел; поддерживаемый способ добавить подписанный сторонний репозиторий — файл набора ключей в /etc/apt/keyrings, на который ссылается параметр Signed-By, в классической однострочной форме либо новом формате deb822 .sources, который понимают Debian 12/13 и современные выпуски Ubuntu.
-
An internal package mirror or cache for Linux clients: apt-cacher-ng and dnf's reposync
Apt-Cacher NG caches Debian/Ubuntu packages on demand behind an HTTP proxy setting, while dnf's reposync plugin makes a full local copy of a chosen RPM repository. Both cut repeated downloads without weakening client-side signature verification, which stays on regardless of where the bytes came from.
-
apt-get, dpkg, dnf and zypper exit codes: when 100 means updates, not failure
apt-get uses a flat 0-success/100-error split; dpkg distinguishes a failed check (1) from a fatal usage or system error (2); dnf's check-update repurposes 100 to mean updates ARE available, not an error; and zypper defines a whole range, 100-107, of informational (non-error) exit codes for conditions like a pending reboot (though 104, package not found, and 105, interrupted, mean the action did not happen). Reading any of these as a plain success/fail boolean loses real information.
-
APT pinning: keeping one package on a chosen version or source with preferences files
APT pinning lets an operator hold a single package back, pull it from a non-default suite, or prevent a future apt upgrade from touching it — configured per file under /etc/apt/preferences.d rather than by editing one shared file, and inspected with apt-cache policy.
-
Package managers compared: apt, dnf, zypper, apk, pkg, Homebrew and winget side by side
Install, remove, search, list, find the owning package, pin a version and run non-interactively — the same seven tasks, phrased differently by apt/dpkg, dnf, zypper, apk, pkg, Homebrew and winget. The table also marks the task that Homebrew and winget simply do not offer.
-
Running apt and dpkg non-interactively on Debian and Ubuntu without hanging on prompts
A scripted apt-get or dpkg run can stall on a debconf prompt, a modified-conffile question or a held dpkg lock. Setting DEBIAN_FRONTEND, the right confold/confdef options and preseeding debconf answers first turns an install into a command that either finishes or fails loudly.
-
Настройка unattended-upgrades для автоматической установки исправлений безопасности в Debian и Ubuntu
unattended-upgrades устанавливает обновления пакетов по таймеру, используя два файла: 20auto-upgrades (нужно ли обновлять и как часто) и 50unattended-upgrades (из каких источников и нужна ли перезагрузка). Проверка с --dry-run --debug до включения в рабочей среде позволяет избежать неожиданных перезагрузок или частично применённых обновлений.
Машиночитаемо: JSON