Debian automatic updates

From Levy

Revision as of 14:09, 29 October 2019 by Louis (talk | contribs) (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 <...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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