summarylogtreecommitdiffstats
path: root/log-orphans.hook
blob: 151e1c95dc0c4021b551069cc46fec0ad656070b (plain)
1
2
3
4
5
6
7
8
9
10
11
[Trigger]
Operation=Install
Operation=Upgrade
Operation=Remove
Type=Package
Target=*

[Action]
Description=Log Orphan Packages
When=PostTransaction
Exec=/bin/bash -c 'pkgs="$(pacman -Qtdq)"; if [[ ! -z "$pkgs" ]]; then echo -e "The following packages are installed but not required (anymore):\n$pkgs\nYou can mark them as explicitly installed with '\''pacman -D --asexplicit <pkg>'\'' or remove them all using '\''pacman -Qtdq | pacman -Rns -'\''"; fi'