-
-
Save LaurentFough/9d3836ea0199cfbcaf3777d65313a771 to your computer and use it in GitHub Desktop.
Pacman post transaction hook to list/remove orphaned packages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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.'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment