Add remove orphans in pacman new orphan hook

This commit is contained in:
flyingscorpio@arch-desktop 2021-01-23 19:34:18 +01:00
parent 2bf0c788f8
commit 140e2f646e

View file

@ -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.'"