Skip to content

Instantly share code, notes, and snippets.

@kholisrag
Created February 5, 2020 16:08
Show Gist options
  • Save kholisrag/2c761f5804030177c3bcc0ee6f7f8501 to your computer and use it in GitHub Desktop.
Save kholisrag/2c761f5804030177c3bcc0ee6f7f8501 to your computer and use it in GitHub Desktop.
Bash Script / Shell Script Function to Disable Auto Update and Auto Upgrade in Ubuntu
#!/bin/bash
function patch_apt() {
echo "Patching System Auto Update and Auto Upgrade..."
sed -i 's/1/0/g' /etc/apt/apt.conf.d/10periodic
sed -i 's/1/0/g' /etc/apt/apt.conf.d/20auto-upgrades
apt-get clean
echo "Auto Update and Auto Upgrade Disabled!!!"
}
patch_apt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment