logo of Akmatori
12.11.2023

How to Disable Automatic Updates in Ubuntu: A Step-by-Step Guide

head-image

Introduction

While automatic updates in Ubuntu are designed to keep your system secure and up-to-date, there are situations where manual control over updates is preferred. Whether you're managing a server environment or need to ensure that updates don't disrupt your workflow, disabling automatic updates can be crucial. This guide will walk you through the steps to disable automatic updates in Ubuntu, giving you full control over when and how updates are applied.

Why Disable Automatic Updates?

Automatic updates provide convenience and security, but they can also introduce unexpected changes or require a system reboot at inopportune times. By managing updates manually, you can apply them at a time that suits you, ensuring minimal disruption to your work or services.

Step 1: Access the Terminal

First, open your terminal. You can do this by pressing Ctrl + Alt + T on your keyboard.

Step 2: Disable Unattended Upgrades

Ubuntu uses a package called unattended-upgrades to manage automatic updates. To disable it, you need to edit its configuration file.

  • Open the configuration file in a text editor with root privileges. For example, using nano:
sudo nano /etc/apt/apt.conf.d/20auto-upgrades
  • Change the content of the file to the following:
APT::Periodic::Update-Package-Lists "0";
APT::Periodic::Download-Upgradeable-Packages "0";
APT::Periodic::AutocleanInterval "0";
APT::Periodic::Unattended-Upgrade "0";
  • Save and close the file. If you're using nano, you can do this by pressing Ctrl + X, then Y to confirm, and Enter to exit.

Step 3: Disable the Update Notifier

To stop receiving automatic update notifications, you can disable the update notifier. Execute the following command to prevent the update notifier from starting automatically:

sudo mv /etc/xdg/autostart/update-notifier.desktop /etc/xdg/autostart/update-notifier.desktop.disabled

Step 4: Manual Update Management

With automatic updates disabled, you'll need to manage updates manually. To check for updates, use:

sudo apt-get update
sudo apt-get upgrade

Conclusion

Disabling automatic updates in Ubuntu puts you in control of your system's update process. While this approach requires more vigilance to ensure your system remains secure, it allows you to apply updates on your own terms. Remember to regularly check for and apply updates to maintain the security and stability of your system.

In the spirit of maintaining control and ensuring optimal performance of your server environment, consider the role of Akmatori - A Globally Distributed TCP/UDP Balancer in your infrastructure. Akmatori enhances your server's connectivity, performance, and security on a global scale, ensuring that your applications remain accessible, fast, and secure, regardless of where your users are located.

Taking control of when and how updates are applied is just one piece of the puzzle. With Akmatori, you can extend this control to how your server handles traffic, optimizing for both performance and security. By managing your traffic with Akmatori, you ensure that your server is not just up-to-date, but also delivering the best possible experience to your end-users.

FAQ

  • Q: How can I re-enable automatic updates later?

    • A: To re-enable automatic updates, revert the changes made in the 20auto-upgrades file and rename the update notifier file back to its original name.
  • Q: Will disabling automatic updates affect my ability to install new software?

    • A: No, you can still install software manually using the apt-get install command.
  • Q: How often should I check for updates manually?

    • A: It's recommended to check for updates at least once a week to ensure your system is protected against the latest vulnerabilities.

Maximize your website or application's performance and reliability!