Yad- Systems Maintenance Dialog (using pacman)

Hello all. I have created a small yad dialog that provides quick access to various pacman system maintenance activities.

Here is what it looks like:

Here’s the bash script for Yad, feel free to offer corrections, improvements additional suggestions:

#!/bin/bash
yad --title "System Maintenance" --form --width=325 --height=200 --text="<b>System Maintenance Launcher</b>" --image "calligraplan" --image-on-top \
--field="<b>Sync Pacman Database</b>":fbtn "sakura -e 'sudo pacman -Syu' " \
--field="<b>Sync Pacman Database; Update System -Full</b>":fbtn "sakura -e 'sudo pacman -Syyu'" \
--field="<b>Check Pacman DB, Update System</b>":fbtn "sakura -e 'sudo pacman -Syu' " \
--field="<b>Rank Mirrors by Speed; Remove Outdated Mirrors</b>":fbtn "sakura -e 'sudo pacman-mirrors -g'" \
 --field="<b>Optimize Sync and Download Speed</b>":fbtn "sakura -e 'sudo pacman-optimize && sync'" \
--field="<b>List Unused Dependencies</b>":fbtn "sakura -e 'pacman -Qdt'" \
--field="<b>Clean Unused Cache</b>":fbtn "sakura -e 'sudo pacman -Sc'" \
--field="<b>Clean Unused Packages, Configurations</b>":fbtn "sakura -e 'sudo pacman -Rsn $(pacman -Qdtq)'" \
--button=Exit:1

Note: You need to install Yad in order for this to work:
baph -i yad

If you want to use this vanilla… you will need to install the sakura terminal (my favorite)
baph -i sakura

EDITS: made per @Head_on_a_Stick @altman recommendations. Thanks!

3 Likes

Wow, that s some work in there again @manyroads

Pretty talented.

Use Sakura for a while on all my installs as well.

^ This is known as a partial upgrade and can break your system.

*Always* upgrade the system when updating the database, Arch isn’t like Debian.

^ That will only downgrade the system if the user has switched from [testing] back to the stable repositories.

1 Like

Wonder if it might be

--field="<b>Sync Pacman Database; Update System -Full</b>":fbtn "sakura -e 'sudo pacman -Syu'" \

instead as @Head_on_a_Stick stated if I remember well in another thread , bet it would be the safest way to go concerning updates.

& remove the line with Force on it.

As for cleaning the cache I use this one in terminal;

pacman -Scc

But this command s less aggressive

pacman -Sc