• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Mister PKI

SSL Certificates * SSL Tools * Certificate Decoder

  • PKI Training
  • OpenSSL
  • Keytool
  • PKI Tools
    • Apereo CAS
    • SAML
    • OpenID Connect
  • Get expert help

Ubuntu unattended upgrades

January 10, 2023 by Mister PKI Leave a Comment

Presumably, you have discovered this article because you are either searching for a way to automatically apply security upgrades to your Ubuntu servers or you have discovered a security package was upgraded without you knowing it. In my case, it was the latter. If you subscribe to a SOC (security operations center) in the cloud, you should keep an eye out for any security vulnerabilities they send your way and be ready to act accordingly. In some cases, the unattended-upgrades package in Ubuntu will save the day and act quicker than you as a sys admin may be able to.

This article is using Ubuntu 22.04.1 LTS (Jammy Jellyfish) for its examples.

In many server installs, by default, unattended-upgrades will be installed and configured for security patches. This can be extended to other upgrade types, modified to check any number of days, and turned off. For security upgrades, we recommend you leave them turned on. For all other upgrades, we will leave that to your discretion and personal requirements.

How to install unattended upgrades on Ubuntu

To install unattended upgrades if not already, run the following command:

sudo apt-get install unattended-upgrades -y

Then configure the package to run at random times with the following command:

sudo dpkg-reconfigure -plow unattended-upgrades

For more fine tuning of what will be automatically upgraded, edit the following file.

sudo vi /etc/apt/apt.conf.d/50unattended-upgrades

In that file you will find a list of update types. Likely, the security updates will be already uncommented out. If you would like the other update types also commented out, just remove the leading // comment marks.

There is another configuration file that determines how often unattended upgrades should check for new updates.

sudo vi /etc/apt/apt.conf.d/20auto-upgrades

The default is 1 day but can be changed to any number of days you need it to.

Conclusion

In conclusion, this article has demonstrated how to manage Ubuntu with unattended upgrades. Check out our other posts for more detailed articles.

linux,  Ubuntu

Reader Interactions

Leave a Reply Cancel reply

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

Primary Sidebar

Popular Posts

PKCS12

openssl s_client

Keytool

Keytool list

ECDSA vs RSA

OpenSSL

PKCS7

Certificate Decoder

PKI for DevOps Engineers – Free Training Series

PKI for DevOps Training Hub

Lesson 1 – How TLS and PKI Work

Lesson 2 – Understanding X.509 Certificates

Lesson 3 – Certificate Chains Explained

Lesson 4 – Debug TLS with OpenSSL

Lesson 5 – Verify Certificate Chains

Lesson 6 – Creating CSRs with OpenSSL

Lesson 7 – Working with PKCS12 Certificates

Lesson 8 – Java Keystores and keytool

Lesson 9 – Certificate Expiration Monitoring

Lesson 10 – Automating Certificate Renewal

Lesson 11 – Common TLS Errors

Lesson 12 – PKI Architecture for DevOps

Recent Posts

  • Apache mod_auth_cas: Protect Web Applications with Apereo CAS and Docker
  • Apache mod_auth_mellon: Configure SAML SSO & Docker
  • Configure OpenID Connect (OIDC) in Apereo CAS 7.3 and 8
  • Certificate Ownership Is an Operating Model Problem, Not a Tooling Problem
  • OpenSSL dgst: Create Checksums and Verify Digital Signatures

Footer

  • Twitter
  • YouTube
Mister PKI

Practical security engineering for the systems that establish trust.

Learn OpenSSL Keytool Free training
Work together PKI consulting CAS consulting Sponsored contributions
Site About Support Mister PKI Cookie policy Search
© 2026 Mister PKI Secure systems. Clear guidance.