How to get automatic upgrades to work on Ubuntu Server?

Posted by J. Pablo Fernández on Server Fault See other posts from Server Fault or by J. Pablo Fernández
Published on 2010-02-09T16:43:42Z Indexed on 2012/06/21 9:18 UTC
Read the original article Hit count: 335

Filed under:
|
|

I followed the documentation for enabling automatic upgrades in Ubuntu servers, but it's not really updating anything at all.

My /etc/apt/apt.conf.d/50unattended-upgrades looks almost like the default.

// Automatically upgrade packages from these (origin, archive) pairs
Unattended-Upgrade::Allowed-Origins {
        "Ubuntu karmic-security";
        "Ubuntu karmic-updates";
};

// List of packages to not update
Unattended-Upgrade::Package-Blacklist {
//      "vim";
//      "libc6";
//      "libc6-dev";
//      "libc6-i686";
};

// Send email to this address for problems or packages upgrades
// If empty or unset then no email is sent, make sure that you
// have a working mail setup on your system. The package 'mailx'
// must be installed or anything that provides /usr/bin/mail.
Unattended-Upgrade::Mail "[email protected]";


// Automatically reboot *WITHOUT CONFIRMATION* if a 
// the file /var/run/reboot-required is found after the upgrade 
//Unattended-Upgrade::Automatic-Reboot "false";

The directory /var/log/unattended-upgrades/ is empty. Running /etc/init.d/unattended-upgrades start is not very nice:

root@mozart:~# /etc/init.d/unattended-upgrades start
Checking for running unattended-upgrades: root@mozart:~#

Something seems to be broken, but I'm not sure why.

I have pending updates and they are not being applied:

root@mozart:~# aptitude safe-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Reading extended state information      
Initializing package states... Done
The following packages will be upgraded:
  linux-libc-dev 
1 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/743kB of archives. After unpacking 4096B will be used.
Do you want to continue? [Y/n/?]

In all the servers I have, unattended upgrades seems to have been disabled:

root@mozart:~# apt-config shell UnattendedUpgradeInterval APT::Periodic::Unattended-Upgrade
root@mozart:~#

Any ideas what am I missing?

© Server Fault or respective owner

Related posts about ubuntu

Related posts about apt