Setting up Debian unattended upgrades

My standard setup (on Debian stable/Lenny):

aptitude install unattended-upgrades

cat > /etc/apt/apt.conf.d/10periodic
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";
^D

cat >> /etc/apt/apt.conf.d/50unattended-upgrades
Unattended-Upgrade::Mail "example@example.com";
^D

It’s as easy as that. [More details in the Ubuntu Wiki]

4 Comments

  1. Hi is there a reason for placing Unattended-Upgrade::Mail in a separate file, or can it also be in 10periodic?

    Thanks in advance

  2. The separation is just a convention for ease of organization, such that all settings that begin with APT::Periodic are in 10periodic and all that begin with Unattended-Upgrade are in 50unattended-upgrades (50periodic was a typo in the original post).

    If you want to put them all in the same, that should work fine. It just means that you'll be deviating from the community convention, which might (or might not) complicate things down the line.

  3. Are you able to make it work with security updates in Lenny? I'm not able to make it work...

    Here are the contents of the log:

    2011-07-02 23:54:41,841 INFO Initial blacklisted packages:
    2011-07-02 23:54:41,841 INFO Starting unattended upgrades script
    2011-07-02 23:54:41,841 INFO Allowed origins are: ["['Debian', 'lenny-security']"]
    2011-07-02 23:54:42,982 DEBUG Checking: linux-image-2.6.26-2-xen-686 (["component: 'main' archive: 'oldstable' origin: 'Debian' label: 'Debian-Security' site 'security.debian.org' isTrusted: 'True'"])
    2011-07-02 23:54:42,996 DEBUG Checking: perl-modules (["component: 'main' archive: 'oldstable' origin: 'Debian' label: 'Debian-Security' site 'security.debian.org' isTrusted: 'True'"])
    2011-07-02 23:54:43,006 DEBUG Checking: linux-libc-dev (["component: 'main' archive: 'oldstable' origin: 'Debian' label: 'Debian-Security' site 'security.debian.org' isTrusted: 'True'"])
    2011-07-02 23:54:43,022 DEBUG Checking: libtiff4 (["component: 'main' archive: 'oldstable' origin: 'Debian' label: 'Debian-Security' site 'security.debian.org' isTrusted: 'True'"])
    2011-07-02 23:54:43,028 DEBUG Checking: perl-base (["component: 'main' archive: 'oldstable' origin: 'Debian' label: 'Debian-Security' site 'security.debian.org' isTrusted: 'True'"])
    2011-07-02 23:54:43,033 DEBUG Checking: xen-linux-system-2.6.26-2-xen-686 (["component: 'main' archive: 'oldstable' origin: 'Debian' label: 'Debian-Security' site 'security.debian.org' isTrusted: 'True'"])
    2011-07-02 23:54:43,068 DEBUG Checking: perl (["component: 'main' archive: 'oldstable' origin: 'Debian' label: 'Debian-Security' site 'security.debian.org' isTrusted: 'True'"])
    2011-07-02 23:54:43,075 DEBUG Checking: linux-modules-2.6.26-2-xen-686 (["component: 'main' archive: 'oldstable' origin: 'Debian' label: 'Debian-Security' site 'security.debian.org' isTrusted: 'True'"])
    2011-07-02 23:54:43,080 DEBUG pkgs that look like they should be upgraded:
    2011-07-02 23:54:43,084 DEBUG blacklist: []
    2011-07-02 23:54:43,085 DEBUG InstCount=0 DelCount=0 BrokenCout=0
    2011-07-02 23:54:43,085 INFO No packages found that can be upgraded unattended

  4. Back when I used Lenny, it worked fine. Is it possible that those packages are marked as 'held' in Aptitude? Since you're using the Xen kernel, I'm assuming that you're on a VPS, and I know that some VPSs don't let customers manage their own kernel.

1 Pingback

  1. 2011-08-17T09:01:57-0400Actualizar Debian automáticamente con unattended-upgrades | /home/braian on August 17, 2011 – 9:01 am
Leave your thoughts
  • You can use some HTML in your comment.
  • Your comment may not display immediately due to spam filtering. Please wait for moderation.