techne/debian.org

49 lines
1.8 KiB
Org Mode
Raw Permalink Normal View History

2024-09-21 04:17:26 +02:00
#+title: Debian
#+setupfile: ../org-templates/page.org
** Setup unattended-upgrades
Edit ~/etc/apt/apt.conf.d/50unattended-upgrades~. Comment out the following lines.
#+BEGIN_SRC perl
Unattended-Upgrade::Origins-Pattern {
// Codename based matching:
// This will follow the migration of a release through different
// archives (e.g. from testing to stable and later oldstable).
// Software will be the latest available for the named release,
// but the Debian release itself will not be automatically upgraded.
"origin=Debian,codename=${distro_codename}-updates";
"origin=Debian,codename=${distro_codename}-proposed-updates";
"origin=Debian,codename=${distro_codename},label=Debian";
"origin=Debian,codename=${distro_codename},label=Debian-Security";
"origin=Debian,codename=${distro_codename}-security,label=Debian-Security";
// Archive or Suite based matching:
// Note that this will silently match a different release after
// migration to the specified archive (e.g. testing becomes the
// new stable).
// "o=Debian,a=stable";
// "o=Debian,a=stable-updates";
// "o=Debian,a=proposed-updates";
"o=Debian Backports,a=${distro_codename}-backports,l=Debian Backports";
};
#+END_SRC
#+BEGIN_SRC perl
Unattended-Upgrade::Remove-Unused-Dependencies "true";
#+END_SRC
Issue the command below to enable automatic updates:
#+BEGIN_SRC shell
sudo dpkg-reconfigure --priority=low unattended-upgrades
#+END_SRC
~/etc/apt/apt.conf.d/20auto-upgrades~ should contain the following:
#+BEGIN_SRC perl
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";
#+END_SRC
Enable the systemd service:
#+BEGIN_SRC shell
sudo systemctl enable --now unattended-upgrades.service
#+END_SRC