Skip to content
BENIBIX Learn

Unattended Upgrades

Infrastructure⌨️ Linux & the Command LinePackage Management

Also known as unattended-upgrades, Automatic Security Updates, Auto Updates (Ubuntu)

A tool that puts in safety fixes by itself. It runs each day.

Think of it like

Think of it like a cleaner who comes every night. You wake up and the house is fixed.

Example

A flaw is found in a tool on Jack's server. That night, unattended upgrades installs the fix before Jack has read the news.

Why it matters

Most break-ins use flaws that already have a fix. Daily updates close that gap.

Definition

Unattended upgrades installs updates on a Debian or Ubuntu machine by itself. It runs once a day with no one watching. On Ubuntu it comes installed and turned on. By default it installs only security fixes. Some fixes still need a restart before they take effect.

Example code

console
$ cat /etc/apt/apt.conf.d/20auto-upgrades
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";
Two lines, each set to 1. The list is refreshed and fixes go in every day.
Once a day, unattended upgrades runs these same steps for safety fixes.

Common mistake

Thinking every fix is live once it is installed. A kernel fix needs a restart, so check for a reboot notice.

Key takeaways

  1. 1
    Daily. Runs once a day by itself.
  2. 2
    Security first. Only safety fixes by default.
  3. 3
    Restart still needed. Some fixes wait for a reboot.

Learn it properly