ps -e -o pid= -o etime= -o fname= |
while read pid etime cmd
do
if [ "$cmd" = "rpm" ]
then
case $etime in ( *-* )
kill "$pid"
;;
esac
fi
done
The *-* matches anything with a dash; this is true if the process is more than one day old. So it will fix your emergency, but leave enough rpm processes running to remind you to do a root cause analysis plus a proper fix.