Test your skills on our all Hosting services and get 15% off!

Use code at checkout:

Skills
23.09.2025

How to disable automatic updates in Ubuntu ?

By default, Ubuntu installs updates automatically to keep your system safe and stable. This is useful for most users, but in some cases you may want to control updates manually — for example, on servers, test environments, or when you need to keep specific software versions.

Main Update Mechanisms in Ubuntu

  • unattended-upgrades — service that installs updates automatically, mostly security patches.
  • APT Periodic — controls how often updates are checked and downloaded.
  • snapd — updates Snap packages automatically.
  • systemd timers — background tasks that run update checks on schedule.

Disable Automatic APT Updates (system updates)

Method 1: Edit configuration file
Open the file:

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

Change or add these lines:

APT::Periodic::Update-Package-Lists "0";

APT::Periodic::Unattended-Upgrade "0";

Save (Ctrl+O) and exit (Ctrl+X).

Method 2: Remove the unattended-upgrades package

sudo apt remove unattended-upgrades -y

Disable Automatic Snap Updates

Option 1: Stop and disable the service

sudo systemctl stop snapd.service

sudo systemctl disable snapd.service

Option 2: Change refresh schedule (safer)

sudo systemctl edit snapd.service

Add:

[Service]
Environment=SNAPD_REFRESH_TIMER=00:00-00:00

This blocks Snap auto-updates.

Disable systemd Timers for APT

Ubuntu uses timers for updates. To disable them:

sudo systemctl disable --now apt-daily.timer

sudo systemctl disable –now apt-daily-upgrade.timer

Check That Auto Updates Are Disabled

systemctl status apt-daily.timer apt-daily-upgrade.timer

Both should show as inactive.

Also check:

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

Important Notes After Disabling Auto Updates

  • Update manually:

sudo apt update && sudo apt upgrade
  • Watch security news to know when to update.
  • On production servers, make backups or system snapshots before updating.
  • To re-enable auto updates, change config values back to “1” or reinstall unattended-upgrades.

Conclusion

Disabling automatic updates in Ubuntu gives you full control over when and how updates are applied. This can be useful for servers and special environments where stability is more important than immediate updates. At the same time, it requires responsibility: you need to apply security updates manually and keep track of vulnerabilities.

Test your skills on our all Hosting services and get 15% off!

Use code at checkout:

Skills