aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/etc/pacman.d
diff options
context:
space:
mode:
Diffstat (limited to 'etc/pacman.d')
-rw-r--r--etc/pacman.d/hooks/orphans.hook12
1 files changed, 12 insertions, 0 deletions
diff --git a/etc/pacman.d/hooks/orphans.hook b/etc/pacman.d/hooks/orphans.hook
new file mode 100644
index 0000000..48c1d8d
--- /dev/null
+++ b/etc/pacman.d/hooks/orphans.hook
@@ -0,0 +1,12 @@
+[Trigger]
+Operation = Install
+Operation = Upgrade
+Operation = Remove
+Type = Package
+Target = *
+
+[Action]
+Description = Searching for orphaned packages...
+When = PostTransaction
+Exec = /usr/bin/bash -c "/usr/bin/pacman -Qtd || /usr/bin/echo '==> no orphans found.'"
+#Exec = /usr/bin/bash -c "[[ if $(/usr/bin/pacman -Qtdq) = 0 ]] && /usr/bin/pacman -Rns $(/usr/bin/pacman -Qtdq) || /usr/bin/echo '==> No orphaned packages found.'"