# rpm --triggers -qp nvidia-gfxG05-kmp-default-460.39_k5.10.9_1-34.1.x86_64.rpm [...] triggerpostun scriptlet (using /bin/sh) -- kernel-default for dir in $(find /lib/modules -mindepth 1 -maxdepth 1 -type d); do if [ ! -d $dir/kernel ]; then test -d $dir/updates && rm -f $dir/updates/nvidia*.ko fi done Maybe checking for /lib/modules/5.10.16-1-default/kernel no longer works and this file doesn't exist although 5.10.16-1-default is the currently installed and running kernel.