From ce78fb1d013bc0555ad3c7e33895c5b4ca282f99 Mon Sep 17 00:00:00 2001 From: Leaced Date: Thu, 23 Mar 2023 15:26:14 +0100 Subject: [PATCH] Add files via upload --- orphans.hook | 10 ++++++++++ paccache.hook | 11 +++++++++++ paccache2.hook | 11 +++++++++++ unneeded.hook | 10 ++++++++++ 4 files changed, 42 insertions(+) create mode 100644 orphans.hook create mode 100644 paccache.hook create mode 100644 paccache2.hook create mode 100644 unneeded.hook diff --git a/orphans.hook b/orphans.hook new file mode 100644 index 0000000..04fc495 --- /dev/null +++ b/orphans.hook @@ -0,0 +1,10 @@ +[Trigger] +Operation = Remove +Operation = Upgrade +Type = Package +Target = * + +[Action] +Description = List orphans +When = PostTransaction +Exec = /usr/bin/bash -c "(/usr/bin/pacman -Qtd && /usr/bin/echo 'uninstall all with »yay -Qtdq | yay -Rns -«') || /usr/bin/echo '==> None found'" diff --git a/paccache.hook b/paccache.hook new file mode 100644 index 0000000..d295299 --- /dev/null +++ b/paccache.hook @@ -0,0 +1,11 @@ +[Trigger] +Operation = Remove +Operation = Install +Operation = Upgrade +Type = Package +Target = * + +[Action] +Description = Keep the last cache of currently installed packages +When = PostTransaction +Exec = /usr/bin/paccache -r diff --git a/paccache2.hook b/paccache2.hook new file mode 100644 index 0000000..f3ce596 --- /dev/null +++ b/paccache2.hook @@ -0,0 +1,11 @@ +[Trigger] +Operation = Remove +Operation = Install +Operation = Upgrade +Type = Package +Target = * + +[Action] +Description = Delete cache of uninstalled packages +When = PostTransaction +Exec = /usr/bin/paccache -ruk1 diff --git a/unneeded.hook b/unneeded.hook new file mode 100644 index 0000000..3dffe5c --- /dev/null +++ b/unneeded.hook @@ -0,0 +1,10 @@ +[Trigger] +Operation = Remove +Operation = Upgrade +Type = Package +Target = * + +[Action] +Description = Possibly unneeded packages (e.g. dependency cycles) +When = PostTransaction +Exec = /usr/bin/bash -c "(pacman -Qqd | pacman -Rsup - && /usr/bin/echo 'uninstall all with »pacman -Qqd | pacman -Rsu -«') || /usr/bin/echo '==> None found'"