Linux – On CentOS 4.4, how can I diagnose “scriptlet failed” errors from rpm -e

centoslinuxrpmscripting

While uninstalling an RPM on CentOS 4.4, I see

error: %preun(mypackage-1.0) scriptlet failed, exit status 1

How can I find out exactly what it's trying to run, so that I can poke around in the script and find out why it's failing?

Best Answer

You could view all Scripts included in a RPM with the following command:

rpm -qi --scripts

Or use:

rpm -evv