Difference between revisions of "Debian automatic updates"

From Levy

(Created page with "Debian makes use of the unattended-upgrades package in order to enable automatic updates.</br> # apt install unattended-upgrades If it doesn't already exist, create a file <...")
 
 
Line 13: Line 13:
Finally restart the unattended upgrade service:
Finally restart the unattended upgrade service:
  systemctl status unattended-upgrades
  systemctl status unattended-upgrades
[[Category:Linux]][[Category:Debian]]

Latest revision as of 10:32, 22 November 2019

Debian makes use of the unattended-upgrades package in order to enable automatic updates.

# apt install unattended-upgrades

If it doesn't already exist, create a file /etc/apt/apt.conf.d/20auto-upgrades with the following content:

APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";

Now enable the repository from which updates can be installed in /etc/apt/apt.conf.d/50unattended-upgrades; in our case, only the security repository:

Unattended-Upgrade::Origins-Pattern {
   "origin=Debian,codename=${distro_codename},label=Debian-Security";
};

Finally restart the unattended upgrade service:

systemctl status unattended-upgrades