APT Unattended

APT unattended upgrades on Debian configuration guide

APT unattended upgrades on Debian configuration guide

For Debian packages

Install unattended-upgrades:

sudo apt install unattended-upgrades

Enable unattended-upgrades:

sudo dpkg-reconfigure unattended-upgrades

Create a custom configuration from the defaults:

sudo cp /etc/apt/apt.conf.d/50unattended-upgrades /etc/apt/apt.conf.d/52unattended-upgrades-local

Edit the custom configuration:

sudo nano /etc/apt/apt.conf.d/52unattended-upgrades-local

The default configuration automatically installs security updates, but not new features. To change this, uncomment the following line under the Unattended-Upgrade::Origins-Pattern section:

//    "origin=Debian,codename=${distro_codename}-updates";

Dry run and debug:

sudo unattended-upgrade --dry-run --debug

Debug and run manually:

sudo unattended-upgrade -d

For Raspberry Pi, Tailscale, and other packages

Check the apt-cache policy:

apt-cache policy

The entries would look something like:

500 https://pkgs.tailscale.com/stable/debian trixie/main all Packages
    release o=Tailscale,n=trixie,l=Tailscale,c=main,b=all
    origin pkgs.tailscale.com
500 https://pkgs.tailscale.com/stable/debian trixie/main armhf Packages
    release o=Tailscale,n=trixie,l=Tailscale,c=main,b=armhf
    origin pkgs.tailscale.com
500 https://pkgs.tailscale.com/stable/debian trixie/main arm64 Packages
    release o=Tailscale,n=trixie,l=Tailscale,c=main,b=arm64
    origin pkgs.tailscale.com
500 http://archive.raspberrypi.com/debian trixie/main armhf Packages
    release o=Raspberry Pi Foundation,a=stable,n=trixie,l=Raspberry Pi Foundation,c=main,b=armhf
    origin archive.raspberrypi.com
500 http://archive.raspberrypi.com/debian trixie/main arm64 Packages
    release o=Raspberry Pi Foundation,a=stable,n=trixie,l=Raspberry Pi Foundation,c=main,b=arm64
    origin archive.raspberrypi.com

o=: origin

n=: codename

Extend the Unattended-Upgrade::Origins-Pattern section of /etc/apt/apt.conf.d/52unattended-upgrades-local with:

// Raspberry Pi
"origin=Raspberry Pi Foundation,codename=${distro_codename}";

// Tailscale
"origin=Tailscale,codename=${distro_codename}";

Dry run and debug following the previous section.

Reference

https://wiki.debian.org/PeriodicUpdates

ChatGPT

Code licensed under the MIT License; all other content under CC BY-SA 4.0.
Last updated on Apr 05, 2026 16:37 UTC
Built with Hugo
Theme Stack designed by Jimmy