tags:

views:

84

answers:

2

My Perl code installed several (4) rpm files as root. the next install removes them (rpm -e) before installing a newer version. One does not remove, with rpm -e giving the error that it is not installed. However, later when the updated file is installed, the message is given that it is already installed.

Manual attempts to remove give the same results. My questions are how to force removal something from the rpm database, and why does this contradication exist (not installed from rpm -e and already installed from rpm -Uvh and rpm -ivh)?

A: 
  1. Once installed, use the package name, not the package filename.
  2. You should not need to remove a package before upgrading it. Doing so means that one or both of the packages are broken.
Ignacio Vazquez-Abrams
A: 

rpm -e --force will forcibly remove a package; rpm -e --nodeps will stop it for checking for other dependencies.

It's possible your RPM database is in some way bent out of shape; you may wish to try an rpm --rebuilddb

Rodger