security.frabs.net
All Guides

Updates · about 5 minutes

Install Security Updates Automatically

What This Means

Security updates only install when someone remembers to run them.

Why It Matters

Most break-ins use holes that were fixed weeks earlier. Automatic security updates close them within a day.

  1. 1

    Install unattended-upgrades

    On most Ubuntu servers it's already installed; this makes sure.

    apt install -y unattended-upgrades
    Terminal: Install unattended-upgrades, on Ubuntu 24.04
  2. 2

    Turn it on

    This is the same file dpkg-reconfigure -plow unattended-upgrades writes.

    printf 'APT::Periodic::Update-Package-Lists "1";\nAPT::Periodic::Unattended-Upgrade "1";\n' > /etc/apt/apt.conf.d/20auto-upgrades
    Terminal: Turn it on, on Ubuntu 24.04
  3. 3

    Check it's on

    cat /etc/apt/apt.conf.d/20auto-upgrades && systemctl is-enabled unattended-upgrades
    Terminal: Check it's on, on Ubuntu 24.04
  4. 4

    Try a run without changing anything

    --dry-run shows what it would install.

    unattended-upgrade --dry-run --debug 2>&1 | tail -5
    Terminal: Try a run without changing anything, on Ubuntu 24.04

Check It’s Fixed

Run the security report again. This check should now pass.

More Updates Guides

Install Waiting Security UpdatesFinish Updates With a Reboot