Ubuntu 22.04 Tutorials

How To Configure Automatic Updates for Ubuntu 22.04

Learn how to configure automatic updates on Ubuntu 22.04 to keep your system secure and up to date. Follow our step-by-step guide now!


Welcome to this comprehensive guide on how to configure automatic updates on Ubuntu 22.04. In this article, we will walk you through the process of enabling automatic updates for your Ubuntu system, ensuring that you stay up to date with the latest security patches, bug fixes, and feature enhancements. With automatic updates, you can have peace of mind knowing that your system is protected and optimized for performance.

How To Configure Automatic Updates: Ubuntu 22.04

Configuring automatic updates in Ubuntu 22.04 is a straightforward process. Follow the steps below to enable automatic updates on your system:

  1. Open the Terminal: Press Ctrl+Alt+T to open the Terminal in Ubuntu.
  2. Update the Package Lists: Type the following command in the Terminal to update the package lists:
   sudo apt update

This command retrieves the latest information about available software packages from the Ubuntu repositories.

  1. Install the unattended-upgrades Package: Run the following command in the Terminal to install the unattended-upgrades package:
   sudo apt install unattended-upgrades

The unattended-upgrades package provides the necessary tools and configurations for automatic updates.

  1. Configure Automatic Updates: Open the configuration file for unattended-upgrades using the following command:
   sudo nano /etc/apt/apt.conf.d/50unattended-upgrades

In the configuration file, you can specify various options for automatic updates. For example, you can define the update interval, specify which packages to exclude from automatic updates, and set up email notifications.

How To Configure Automatic Updates: Ubuntu 22.04 – Configuration Options

Update Interval

By default, automatic updates are scheduled to run once a day. If you want to change the update interval, look for the following line in the configuration file:

   //Unattended-Upgrade::Allowed-Origins {
   //    "${distro_id}:${distro_codename}-security";
   //    "${distro_id}:${distro_codename}-updates";

Uncomment the lines by removing the // at the beginning and adjust the update frequency according to your preference.

Excluding Packages from Automatic Updates

To exclude specific packages from automatic updates, locate the following line in the configuration file:

   //Unattended-Upgrade::Package-Blacklist {
   //    "vim";
   //    "libc6";
   //    "libc6-dev";
   //    "libc6-i686";

Remove the // in front of the lines and add the package names that you want to exclude.

Email Notifications

If you wish to receive email notifications about automatic updates, find the following lines in the configuration file:

   //Unattended-Upgrade::Mail {
   //    // The package update message is sent to this address
   //    "root";

Uncomment the lines and replace "root" with your email address.

  1. Save and Exit: After making the necessary changes in the configuration file, press Ctrl+O to save the file and Ctrl+X to exit the text editor.
  2. Enable Automatic Updates: Run the following command to enable automatic updates:
   sudo dpkg-reconfigure --priority=low unattended-upgrades

This command reconfigures the unattended-upgrades package and enables automatic updates based on the configurations you defined.

Congratulations! You have successfully configured automatic updates for Ubuntu 22.04. Your system will now automatically download and install updates, keeping your system secure and up to date.

Frequently Asked Questions

FAQ 1: Why should I enable automatic updates on Ubuntu 22.04?

Enabling automatic updates on Ubuntu 22.04 is crucial for maintaining the security and stability of your system. Automatic updates ensure that your system receives the latest security patches and bug fixes promptly, reducing the risk of potential vulnerabilities and improving overall performance.

FAQ 2: Can I customize the update schedule?

Yes, you can customize the update schedule by modifying the configuration options in the unattended-upgrades package. You can adjust the update interval, specify excluded packages, and even set up email notifications to suit your preferences.

FAQ 3: Will automatic updates disrupt my work?

Automatic updates are designed to run in the background and minimize disruption to your work. By default, updates are scheduled to run once a day, ensuring that your system stays up to date without causing significant interruptions. However, it is recommended to save your work before the updates occur, as a system restart might be required for some updates to take effect.

FAQ 4: Can I disable automatic updates if needed?

Yes, you can disable automatic updates if necessary. To do so, you can either remove the unattended-upgrades package or modify the configuration file to disable automatic updates temporarily or permanently. However, it is strongly advised to keep automatic updates enabled to ensure the security and performance of your Ubuntu 22.04 system.

FAQ 5: What if I encounter issues after enabling automatic updates?

In rare cases, you may encounter issues after enabling automatic updates. If you experience any problems, such as software compatibility issues or system instability, you can revert the changes by modifying the configuration file or uninstalling the unattended-upgrades package. Always ensure that you have a backup of your important data before making any significant system changes.

FAQ 6: Can I manually check for updates?

Yes, you can manually check for updates by running the following command in the Terminal:

sudo apt update
sudo apt upgrade

The first command updates the package lists, and the second command upgrades the installed packages to their latest versions, if available.


In conclusion, configuring automatic updates on Ubuntu 22.04 is a vital step in maintaining a secure and optimized system. By following the steps outlined in this guide, you can enable automatic updates and ensure that your Ubuntu 22.04 system remains up to date with the latest software enhancements. Remember to customize the configuration options according to your preferences and monitor the system for any potential issues. With automatic updates in place, you can focus on your tasks with confidence, knowing that your Ubuntu 22.04 system is protected and running smoothly.

I hope this article was helpful!  You can find more here: Ubuntu Tutorial Articles

Leave a Comment

Stay Informed

Receive instant notifications when new content is released.