From 140e2f646e8c8a54548488caffa397dcba05e681 Mon Sep 17 00:00:00 2001 From: "flyingscorpio@arch-desktop" Date: Sat, 23 Jan 2021 19:34:18 +0100 Subject: [PATCH] Add remove orphans in pacman new orphan hook --- pacman_hooks/new_orphan.hook | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacman_hooks/new_orphan.hook b/pacman_hooks/new_orphan.hook index 6f3a654..27d044e 100644 --- a/pacman_hooks/new_orphan.hook +++ b/pacman_hooks/new_orphan.hook @@ -8,4 +8,4 @@ Target = * [Action] Description = Checking if a transaction orphaned a package... When = PostTransaction -Exec = /usr/bin/bash -c "/usr/bin/pacman -Qtd || /usr/bin/echo '=> None found.'" +Exec = /usr/bin/bash -c "/usr/bin/pacman -Qtd && /usr/bin/pacman -Rns $(/usr/bin/pacman -Qdtq) || /usr/bin/echo '=> None found.'"