Configure Automatic Updates
Setting up automatic updates
Installing unattended-upgrades package
- Install unattended-upgrades package
apt-get install unattended-upgrades
Configuring unattended-upgrades
- Edit /etc/apt/apt.conf.d/50unattended-upgrades and adjust the following
Unattended-Upgrade::Allowed-Origins {
"${distro_id}:${distro_codename}";
"${distro_id}:${distro_codename}-security";
// "${distro_id}:${distro_codename}-updates";
// "${distro_id}:${distro_codename}-proposed";
// "${distro_id}:${distro_codename}-backports";
};
Enable automatic updates
- Edit /etc/apt/apt.conf.d/20auto-upgrades and set the appropriate apt configuration options
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "7";
APT::Periodic::Unattended-Upgrade "1";