Error in PREUN scriptlet … file was supposed to be removed but is not

Sometimes a yum/RPM package would get “stuck” and just won’t go away. Actually usually the package is already gone but yum/rpm fails to update it’s internal DB and still thinks it is there.

The error one usually sees in such cases is something like:

Error in PREUN scriptlet in rpm package stlinux23-sh4_uclibc-which
stlinux23-sh4_uclibc-which-2.16-5.sh4_uclibc was supposed to be removed but is not!

So in my case the package stlinux23-sh4_uclibc-which-2.16-5.sh4_uclibc is causing problems, it will be soemthing different in your case

To fix the problem run:

yum --setopt=tsflags=noscripts remove stlinux23-sh4_uclibc-which.sh4_uclibc

You can add more than one package file to the end of the command.

10 thoughts on “Error in PREUN scriptlet … file was supposed to be removed but is not

  1. Hi guys;

    But this procedure remove complete all the rpm with dependencies?, or what is the taks that fix?. I have similar problems but in my case I have like 23 taks inside the rpm and in the task 17/23 fail due a missing folder on the RHEL.

    Any hint to comprobe that all the dependencies are remove!.

    • Can you run the command to remove just the problematic package? Besides missing folder sounds like a different type oi problem… and it also seems that you are trying to install somepackage (with dependencies? and one of them is failing?). Here I was talking about UNINSTALLING…

Leave a Reply

Your email address will not be published. Required fields are marked *