Last active
March 1, 2023 16:41
-
-
Save raghunayak/988facb32a88dd3ac33afe8be8fe2f14 to your computer and use it in GitHub Desktop.
Script to disable Auto Updater on Ubuntu 16.04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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