Howdy people,

in this HowTo I want to show you how to upgrade Jenkins automatically via unattended-upgrades.

Maybe you know the unattended-upgrades package.
Especially for security updates this package can be useful and important.

For example, an important update for Apache 2.4 came out in the night – and my server just installed it automatically.

Nothing is more convenient to wake up, check your iPhone and see that the security updates are installed.

First install unattended-upgrades

sudo apt-get update && sudo apt-get install unattended-upgrades



Now you need to add the file /etc/apt/apt.conf.d/20auto-upgrades

APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";

Now the unattended upgrades are enabled.

Next edit the unattended-upgrades config in /etc/apt/apt.conf.d/50unattended-upgrades
To enable Jenkins add this entry to Allowed-Origins


Mine looks like this

Unattended-Upgrade::Allowed-Origins {
//      "${distro_id}:${distro_codename}-proposed";
//      "${distro_id}:${distro_codename}-backports";


Pro tip: Email the result 🙂

When you have mailx installed, you can deliver an E-Mail to any configured address, containing the results.
Simply add or uncomment

Unattended-Upgrade::Mail "[email protected]";

Thanks for reading – looking forward to hearing from you 🙂

HowTo – Unattended Upgrades for Jenkins

2 thoughts on “HowTo – Unattended Upgrades for Jenkins

  • December 19, 2017 at 1:02 pm

    The origin is now “”, could you please update the post?

    • December 19, 2017 at 2:21 pm

      Thanks for the hint, done! 🙂


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.