yum error in PREUN scriptlet when removing packages

Solution 1:

It seems like somehow yum cached data and the rpm database got out of sync with each other I guess. Try running the next commands:

su -c 'yum clean all && rpm --rebuilddb'
su -c 'package-cleanup --problems'

Then run:

su -c 'yum erase zarafa*'

Edit #1: Try running the next command:

# su -c 'yum --setopt=tsflags=noscripts remove zarafa*'

If that doesn't work, try this:

# su -c 'rpm -e --noscripts zarafa*'

Solution 2:

I did a rpm -ql <packagename> to see the package original contents.

manually deleted any left over file.

ran yum with the noscripts flag as described above, so the script doesn't fail.

yum --setopt=tsflags=noscripts remove <packagename>

Tags:

Rpm

Yum

Centos