From a714b5de9beea6c0cbbae51c66d1a831daeb3250 Mon Sep 17 00:00:00 2001 From: alvinlollo Date: Wed, 29 Jan 2025 12:08:05 +0000 Subject: [PATCH] added update-all script --- extras/update-all script | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 extras/update-all script diff --git a/extras/update-all script b/extras/update-all script new file mode 100644 index 0000000..c0b9375 --- /dev/null +++ b/extras/update-all script @@ -0,0 +1,35 @@ +#!/bin/bash + +echo +echo -e "\e[1;31m Full Auto Update by AlvinV \e[0m" +echo +echo -e "\e[1;33m Running apt-get update \e[0m" +echo +apt-get update +echo +echo -e "\e[1;32m Finnished running apt-get update \e[0m" +echo -e "\e[1;33m Running apt update \e[0m" +echo +apt update +echo +echo -e "\e[1;32m Finnished running apt update \e[0m" +echo -e "\e[1;33m Running apt upgrade \e[0m" +echo +apt upgrade -y +echo +echo -e "\e[1;32m Finnished running apt update \e[0m" +echo -e "\e[1;33m Running apt full-upgrade \e[0m" +echo +apt-get full-upgrade -y +apt full-upgrade -y +echo +echo -e "$\e[1;32m Finnished updating all packages \e[0m" +echo +while true; do + read -p "Do you wish to remove unused packages? [Y/N]: " yn + case $yn in + [Yy]* ) apt autoremove -y && apt autopurge -y; break;; + [Nn]* ) exit;; + * ) echo "Please answer yes or no.";; + esac +done \ No newline at end of file