Skip to content

Instantly share code, notes, and snippets.

@neklaf
Last active May 1, 2020 14:37
Show Gist options
  • Save neklaf/9a807e1d166c4a59f6901e659b9a30f7 to your computer and use it in GitHub Desktop.
Save neklaf/9a807e1d166c4a59f6901e659b9a30f7 to your computer and use it in GitHub Desktop.
Managing unattended upgrades in Debian GNU/Linux

Install

# apt install unattended-upgrades

Enable

$ grep -v -e "//" /etc/apt/apt.conf.d/50unattended-upgrades
Unattended-Upgrade::Origins-Pattern {
        "origin=Debian,codename=${distro_codename},label=Debian";
        "origin=Debian,codename=${distro_codename},label=Debian-Security";
        "origin=Debian,codename=${distro_codename}-security,label=Debian-Security";
};
Unattended-Upgrade::Package-Blacklist {
};

$ cat /etc/apt/apt.conf.d/20auto-upgrades
APT::Periodic::Update-Package-Lists "0";
APT::Periodic::Unattended-Upgrade "0";

It possible to disable automatic updates by setting "0" in this parameter APT::Periodic::Update-Package-Lists Logs can be reviewed here /var/log/unattended-upgrades

Stop

# systemctl stop unattended-upgrades.service

Disable

# apt remove unattended-upgrades
# rm /etc/apt/apt.conf.d/20auto-upgrades
# rm /etc/apt/apt.conf.d/50unattended-upgrades
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment