Created
November 25, 2019 10:32
-
-
Save VictorGob/dc156f22c7d0f1a6daaecb2d22f2768d to your computer and use it in GitHub Desktop.
Bash script: updating Ubuntu and snaps
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/bash | |
if [ $EUID != 0 ]; then | |
sudo "$0" "$@" | |
exit $? | |
fi | |
echo -e "" | |
echo -e "\e[1;31m****************Update & dist-upgrade!!\e[0m" | |
echo -e "" | |
sudo apt update | |
sudo apt -y dist-upgrade | |
echo -e "" | |
sudo do-release-upgrade | |
echo -e "" | |
echo -e "\e[1;31m****************Ending update script\e[0m" | |
echo -e "" | |
echo -e "\e[1;31m****************Snap refresh\e[0m" | |
echo -e "" | |
snap refresh | |
echo -e "" | |
echo -e "\e[1;31m****************Cleaning\e[0m" | |
echo -e "" | |
sudo apt clean | |
sudo apt -y autoremove |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment