Skip to main content

Setting Up Automatic Updates on Debian

Having automatic updates on linux machine can be beneficial to stay up to date with latest patches. At very least security updates should be enabled

 

Set up Automatic Updates
    Install Unattended Upgrades
    sudo apt install unattended-upgrades apt-listchanges

    At Very Least Reconfigure Unattended Upgrades for Security Patches

    sudo dpkg-reconfigure --priority=low unattended-upgrades
      Configure unattended-upgrades file
      sudo nano /etc/apt/apt.conf.d/50unattended-upgrades

      You can enable security updates and other types of updates by uncommenting the appropriate lines. 

      Unattended-Upgrade::Allowed-Origins {
          "${distro_id}:${distro_codename}-security";
          "${distro_id}:${distro_codename}-updates";
      };
        Enable Automatic Updates
        sudo nano /etc/apt/apt.conf.d/20auto-upgrades

        Add or Modify following lines

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

        This configuration will check for updates daily