Last active
October 9, 2022 17:23
-
-
Save LetUsFlow/8e271eda8bc2052127851988571124e6 to your computer and use it in GitHub Desktop.
This file contains 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/bash | |
TEXT_RESET='\e[0m' | |
TEXT_YELLOW='\e[0;33m' | |
TEXT_RED_B='\e[1;31m' | |
sudo apt update | |
echo -e $TEXT_YELLOW | |
echo 'APT update finished...' | |
echo -e $TEXT_RESET | |
sudo DEBIAN_FRONTEND=noninteractive apt dist-upgrade | |
echo -e $TEXT_YELLOW | |
echo 'APT distributive upgrade finished...' | |
echo -e $TEXT_RESET | |
sudo DEBIAN_FRONTEND=noninteractive apt upgrade | |
echo -e $TEXT_YELLOW | |
echo 'APT upgrade finished...' | |
echo -e $TEXT_RESET | |
sudo apt autoremove | |
echo -e $TEXT_YELLOW | |
echo 'APT auto remove finished...' | |
echo -e $TEXT_RESET | |
sudo snap refresh | |
echo -e $TEXT_YELLOW | |
echo 'SNAP refresh finished...' | |
echo -e $TEXT_RESET | |
LANG=en_US.UTF-8 snap list --all | awk '/disabled/{print $1, $3}' | | |
while read snapname revision; do | |
sudo snap remove "$snapname" --revision="$revision" | |
done | |
echo -e $TEXT_YELLOW | |
echo 'SNAP remove old Snaps finished...' | |
echo -e $TEXT_RESET | |
if [ -f /var/run/reboot-required ]; then | |
echo -e $TEXT_RED_B | |
echo 'Reboot required!' | |
echo -e $TEXT_RESET | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment