# Unattended Upgrades

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

**Field:** Infrastructure  
**Category:** Linux & the Command Line  
**Also known as:** unattended-upgrades, Automatic Security Updates, Auto Updates (Ubuntu)

## Think of it like

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

## 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

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

## 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.

## Why it matters

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

## Common mistake

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

## Three principles

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

## Related terms

- [Advanced Package Tool (APT)](https://learn.benibix.com/term/infrastructure/apt)
- [Debian Package (.deb)](https://learn.benibix.com/term/infrastructure/debian-package)
- [Ubuntu](https://learn.benibix.com/term/development/ubuntu)
- [Cybersecurity](https://learn.benibix.com/term/infrastructure/cybersecurity)
- [Security Patch](https://learn.benibix.com/term/development/security-patch)

## Taught in

- [APT and .deb Packages](https://learn.benibix.com/learn/infrastructure-linux/apt-and-deb-packages): Linux CLI, 7/10

![Three steps from left to right. First, apt update fetches a fresh list of packages from an online store of packages. Second, apt install downloads one .deb box and the boxes it needs. Third, the files are unpacked onto the server. Below, a box marked every day shows unattended upgrades running the same steps for security fixes.](https://learn.benibix.com/diagrams/inf3-apt.svg)

---

Source: https://learn.benibix.com/term/infrastructure/unattended-upgrades
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
