Disabling Auto-Updates on Ubuntu

Introduction

When software auto-updates without warning, it can really throw you off. New configurations and updates to features you’re used to can slow you down as you try to relearn and navigate everything. To prevent this, we wanted to share how you can disable these auto-updates for Ubuntu 16.04, 18.04, and 20.04.

Prerequisites

Before you can disable auto-updates, you need to have Ubuntu 16.04, 18.04, or 20.04 installed on your computer.

Steps

Perform the following commands and config edits on computes, controllers, gateways, and infra hosts to disable automatic updating on Ubuntu 18.04. These steps also work to disable automatic updating on Ubuntu 16.04 and Ubuntu 20.04.

Stop and Disable "unattended-upgrades" service

systemctl stop unattended-upgrades
systemctl disable unattended-upgrades

Edit Auto-update Configs

/etc/apt/apt.conf.d/10periodic

This config file should have these three lines:

APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "0";
APT::Periodic::AutocleanInterval "0";

Change all of the lines from "1" to "0" if they are not. Save the file.

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

This config should have these two lines:

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

Change both lines from "1" to "0". The Infra server may not have the 20auto-upgrades file. Make sure you save the file.

Check the GUI to make sure Auto-Updates are off

Search your machine for "software and updates" -> go to the updates tab and check the following:

Automatically check for updates: never
When there are security updates: display immediately
When there are other updates: display weekly

Conclusion

We hope this quick and easy tutorial for disabling auto-updates on Ubuntu 16.04, 18.04, and 20.04 will help save you some time and aggravation! Don’t hesitate to contact us with any questions you may have. Awnix is here for you.

Leave a Comment