diff --git a/README.md b/README.md index d4a806e..6a2ab76 100644 --- a/README.md +++ b/README.md @@ -12,23 +12,28 @@ License: GPL3 (http://www.gnu.org/licenses/gpl.html) Author : Salih Emin Email : salih-(a)-utappia.org - Date : 07-10-2024 (first release 19-02-2009) - Version: 24.10.07 + Date : 17-11-2024 (first release 19-02-2009) + Version: 24.11.17 System : Ubuntu Linux and derivatives. With Deb, Snap or Flatpak. (Partial support for Debian and WSL2) WebSite: http://utappia.org ## Sponsors of the previous development cycle (v24.09) -With version 24.06 of uCareSystem, I added a section to acknowledge the people who supported the development of the previous cycle. This addition was warmly received by the community, and I can't express enough gratitude to those who donated during the previous (v24.09) development cycle: +With version 24.06 of uCareSystem, I added a section to acknowledge the people who supported the development of the previous cycle. This addition was warmly received by the community, and I can't express enough gratitude to those who donated during the previous (v24.10) development cycle: - P. Loughman (Thanks for your continued support) - D. Emge (Thanks for your continued support) -- H. Karasoulis -- D. Anastasopoulos +- N. Karanikolas +- J. Michailidis +- M. Stade +- M. C. Enache +- Er. Vlyziotis +- J. Cain +- D. Luchini ## Description: -In summary, uCareSystem automatically performs the following maintenance processes without the need for user interference. : +In summary, uCareSystem performs the following list of maintenance tasks automatically and without the need for user interference. : - Updates the list of available packages - Downloads and installs the available updates @@ -41,35 +46,35 @@ In summary, uCareSystem automatically performs the following maintenance process - Removes obsolete packages - Removes orphan packets - Deletes package configuration files from packages that have been uninstalled by you -- If there is a required reboot, it will inform you with the packeages that requested for a system reboot +- If there is a need for a system reboot, it will inform you and it will provide the list of packeages that requested that system reboot ![ucaresystem-core](https://github.com/user-attachments/assets/a684a40e-403f-4306-a4dc-930575e066c5) ## Usage -uCareSystem creates an launcher icon in your Applications menu. Just search your applications manu for `ucare`. When you click it, it performs the default maintenance by automatically launching a terminal. +uCareSystem creates an launcher icon in your Applications menu. Just search your applications manu for `ucare`. If you click the icon, it starts performing the default maintenance tasks. Alternatively, you can invoke it through terminal with various options/flags. The default system updates and maintenace for Ubuntu / Debian / Linux Mint (and derivatives) : ``` -sudo ucaresystem-core +ucaresystem-core ``` If you want to shutdown your system after using the uCareSystem you can use the `-s` option : ``` -sudo ucaresystem-core -s +ucaresystem-core -s ``` When the next available release is availabe for Ubuntu (and official flavors) you can upgrade with `-u`: ``` -sudo ucaresystem-core -u +ucaresystem-core -u ``` If you are a tester, developer, or simply an enthusiast, you can upgrade to the next development cycle of Ubuntu (and official flavors) with `-d` which actually turns your Ubuntu into a rolling release distribution: ``` -sudo ucaresystem-core -d +ucaresystem-core -d ``` If your Ubuntu (and official flavors) has reached the EOL support you can upgrade to the next supported release with `-eol`: ``` -sudo ucaresystem-core -eol +ucaresystem-core -eol ``` For information about all the availabe options / flags, start ucaresystem-core with `-h` option : ``` -sudo ucaresystem-core -h +ucaresystem-core -h ``` diff --git a/ucaresystem-core b/ucaresystem-core index a2f6421..bf0acdb 100755 --- a/ucaresystem-core +++ b/ucaresystem-core @@ -10,8 +10,8 @@ set -e # Author : Salih Emin # WebSite: http://utappia.org # Email : salih-(at)-utappia.org -# Date : 07-10-2024 (first release 19-02-2009) -# Version: 24.10.07 +# Date : 17-11-2024 (first release 19-02-2009) +# Version: 24.11.17 # System : Ubuntu Linux and derivatives. With Deb, Snap or Flatpak. (Partial support for Debian and WSL2) # Description: #This simple script will automatically refresh your package list, download and install @@ -23,9 +23,9 @@ set -e #Variables DIST_CODENAME=$(lsb_release --codename | cut -f2) DATE=(date +%F_%T) -UCARE_VERSION=(24.10.07) +UCARE_VERSION=(24.11.17) USERNAME=$(logname 2>/dev/null || echo $USER) -PREV_VER=(24.09) +PREV_VER=(24.10) # Checking if the user has run the script with "sudo" or not if [[ $EUID -ne 0 ]] ; then clear @@ -49,7 +49,7 @@ if ! CHECK_INTERNET; then echo "No internet connection detected..." sleep 1 echo "Please ensure that your system is connected to the internet," - echo "and try again..." + echo "and then try again..." echo "Now I will just exit..."1>&2 echo "" sleep 2 @@ -96,18 +96,13 @@ function WELCOME_SCREEN { function MAINTENANCE { echo echo - echo "#########################" - echo " Started" - echo "#########################" - echo + echo "====== Started ======" sleep 1 echo - echo "#######################################" - echo "Checking Disk before System Maintenance" - echo "#######################################" + echo "====== Checking Disk usage before System Maintenance ======" echo df_output=$(df -h / | awk 'NR==2 {print "Percentage of disk space used:", $5, "\nFree space available:", $4}') - echo "Here is the disk space before cleaning" + echo "" echo "$df_output" echo sleep 1 @@ -120,36 +115,34 @@ function MAINTENANCE { echo fi ## Updates package lists - echo "Updating package lists..." + echo "====== Updating package lists ======" echo - sudo apt update 2> >(sed 's/^WARNING.*//') | xargs -I{} printf '%-*s\r' $(tput cols) "{}" && echo + # Update package lists and filter out warnings + sudo apt update 2> >(sed 's/^WARNING.*//') | + # Print each line with padding to fit the terminal width + xargs -I{} printf '%-*s\r' $(tput cols) "{}" && echo echo "Here are the packages that can be upgraded if they are not kept back due to phased releases:" sleep 1 sudo apt list --upgradable; echo - echo "###############################" - echo "Finished updating package lists" - echo "###############################" + echo "====== Finished updating package lists ======" sleep 1 + echo ## Updates packages and libraries sudo apt full-upgrade -V -y; echo - echo "###############################################" - echo "Finished updating packages and system libraries" - echo "###############################################" + echo "====== Finished upgrading system packages and libraries ======" sleep 1 echo ## Removes unneeded packages - sudo sudo apt autoremove -y --purge; + sudo apt autoremove -y --purge; echo - echo "###################################" - echo "Finished removing unneeded packages" - echo "###################################" + echo "====== Finished removing unneeded packages ======" sleep 1 echo - echo "Checking for Snap and Flatpak updates and removing unused revisions..." + echo "====== Checking for Snap and Flatpak updates ======" echo # Check if Snap is installed if command -v snap &> /dev/null; then @@ -175,7 +168,8 @@ function MAINTENANCE { # Remove old revisions of Snap packages echo - echo "Removing old revisions of Snap packages..." + echo "===== Removing old revisions of Snap packages =====" + echo LANG=C sudo snap list --all | awk '/disabled/{print $1, $3}' | while read snapname revision; do sudo snap remove --purge "$snapname" --revision="$revision" @@ -200,23 +194,23 @@ function MAINTENANCE { fi # Check if flatpak is installed then start maintenance if command -v flatpak &>/dev/null; then - echo "Updating Flatpak packages..." + echo "" + echo "===== Updating Flatpak packages =====" sleep 1 sudo flatpak update -y - echo - echo "Removing unused Flatpak packages..." + echo "" + echo "===== Removing unused Flatpak packages =====" sudo flatpak uninstall --unused -y sleep 1 echo else - echo + echo "" + echo "===== Updating Flatpak packages =====" echo "Flatpak is not available on this system. Skipping." sleep 1 fi echo - echo "################################################" - echo "Finished refreshing of Snap and Flatpak packages" - echo "################################################" + echo "===== Finished refreshing Snap and Flatpak packages =====" sleep 1 echo @@ -258,35 +252,25 @@ function MAINTENANCE { sudo apt $APT_OPTS remove -y --purge $PURGE; echo - echo "###################################" - echo "Finished removing old kernels" - echo "###################################" + echo "===== Finished removing old kernels =====" sleep 1 echo ## Removes unused config files of uninstalled packages dpkg --get-selections | grep deinstall | cut -f1 | xargs sudo apt autoremove -y --purge; echo - echo "######################################################" - echo "Finished removing config files of uninstalled packages" - echo "######################################################" + echo "===== Finished removing the config files of uninstalled packages =====" sleep 1 echo ## Removes package files that can no longer be downloaded and everything except # the lock file in /var/cache/apt/archives, including directories. - sudo apt-get -y autoclean; sudo apt-get -y clean; - echo - echo "######################################" - echo " Cleaned downloaded temporary packages" - echo "######################################" + sudo apt -y autoclean; sudo apt -y clean; echo + echo "===== Finished cleaning up downloaded packages =====" sleep 1 echo - echo "#########################################" - echo " Checking to see if a reboot is required" - echo "#########################################" - echo + echo "===== Checking to see if a reboot is required =====" ## Check to see if a reboot is required if [ -f /var/run/reboot-required ]; then echo @@ -312,9 +296,7 @@ function MAINTENANCE { fi sleep 1 echo - echo "######################################" - echo "Checking Disk after System Maintenance" - echo "######################################" + echo "===== checking Disk usage after System Maintenance =====" echo df_output=$(df -h / | awk 'NR==2 {print "Percentage of disk space used:", $5, "\nFree space available:", $4}') echo "$df_output" @@ -333,8 +315,8 @@ deb http://old-releases.ubuntu.com/ubuntu/ $DIST_CODENAME-security main restrict EOT -sudo apt-get install update-manager-core -sudo apt-get -y dist-upgrade +sudo apt install update-manager-core +sudo apt -y dist-upgrade sudo do-release-upgrade } @@ -371,42 +353,35 @@ function SHOW_HELP { ~ $UCARE_VERSION ~ All-in-one system update and maintenance app - Usage: sudo ucaresystem-core + Usage: sudo ucaresystem-core