[Trigger] Operation = Install Operation = Upgrade Type = File Target = usr/lib/modules/*/vmlinuz [Action] Description = Create a boot environment When = PreTransaction Exec = /usr/bin/bash -c 'if [[ $(/usr/bin/zectl get -H pacmanhook) =~ yes ]];then /usr/share/libalpm/scripts/zectl-prune ; fi'