vanutsteen.nl => nerds only A blog on rails, php, computing, my bass guitar and stuff

Unattended upgrades on a Ubuntu Hardy server

on in Linux

I wanted to update my hardy servers automatically, so I could spend a little less time each week working on my servers. I’ve searched through the ubuntu wiki/documentation and I think using the unattended-upgrade package is the nicest alternative.

I installed two packages:

1
apt-get install unattended-upgrades update-notifier-common

And then edited two files:

/etc/apt/apt.conf.d/50unattended-upgrades
1
2
3
4
5
// Automaticall upgrade packages from these (origin, archive) pairs
Unattended-Upgrade::Allowed-Origins {
"Ubuntu hardy-security";
"Ubuntu hardy-updates";
};
/etc/apt/apt.conf.d/10periodic
1
2
3
4
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "1";
APT::Periodic::Unattended-Upgrade "1";

Now every day the server gets upgraded via /etc/cron.daily/apt

Comments