Last active
September 1, 2024 12:17
-
-
Save eusonlito/4746228 to your computer and use it in GitHub Desktop.
Upgrade a GNU/Linux Debian or Ubuntu system with only one command
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
#/bin/sh | |
if [ "`whoami`" != 'root' ]; then | |
echo '' | |
echo 'Only root can execute this script' | |
echo '' | |
exit 1 | |
fi | |
export DEBIAN_FRONTEND=noninteractive | |
export NEEDRESTART_MODE=a | |
export DEBIAN_PRIORITY=critical | |
apt clean | |
apt autoclean | |
apt update | |
apt \ | |
-o Dpkg::Options::="--force-confdef" \ | |
-o Dpkg::Options::="--force-confold" \ | |
-o APT::Get::Always-Include-Phased-Updates=true \ | |
--assume-yes \ | |
--allow-unauthenticated \ | |
--allow-downgrades \ | |
dist-upgrade | |
apt autoremove --assume-yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment