-
-
Save tuxarch/02aaa122861f4e0f5419275a234613d6 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