Running a script after a dnf update in Fedora 41 / dnf5

Ah, I see. Yeah, I think the GUI uses PackageKit which calls libdnf directly (I don’t think it runs /usr/bin/dnf, so even replacing that system file would be unlikely to work.)