Skip to content

Instantly share code, notes, and snippets.

@raghunayak
Last active March 1, 2023 16:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raghunayak/988facb32a88dd3ac33afe8be8fe2f14 to your computer and use it in GitHub Desktop.
Save raghunayak/988facb32a88dd3ac33afe8be8fe2f14 to your computer and use it in GitHub Desktop.
Script to disable Auto Updater on Ubuntu 16.04
#!/usr/bin/env bash
# Script to disable auto-updater on Ubuntu 16.04
# Disable the automatic package updates
echo "Disabling automatic package updates and upgrades"
sudo sed -i 's/"1"/"0"/g' /etc/apt/apt.conf.d/10periodic /etc/apt/apt.conf.d/20auto-upgrades
# Stop and disable apt updater/upgrade timers/services
sudo systemctl disable --now apt-daily.timer
sudo systemctl disable --now apt-daily.service
sudo systemctl disable --now apt-daily-upgrade.timer
sudo systemctl disable --now apt-daily-upgrade.service
# Disable update notifier
sudo apt remove -y appstream
sudo sed -i 's|^/*|//|' /etc/apt/apt.conf.d/99update-notifier
# Disable major OS upgrade prompts
sudo sed -i 's/Prompt=.*$/Prompt=never/' /etc/update-manager/release-upgrades
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment