Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linux rpm installs but cannot erase. Why? [closed]

Tags:

linux

rpm

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)?

like image 447
user1313358 Avatar asked May 11 '10 13:05

user1313358


3 Answers

  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.
like image 56
Ignacio Vazquez-Abrams Avatar answered Oct 23 '22 18:10

Ignacio Vazquez-Abrams


The reason it is not erased is likely because one of the scriptlets is failing. Do it manually and watch for errors. If it mentions a failed scriptlet, try erasing it with rpm -e --noscripts

like image 28
Rich Avatar answered Oct 23 '22 17:10

Rich


rpm -e --force will not forcibly remove a package, rpm -e --nodeps will by stopping it to check 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

like image 3
Rodger Avatar answered Oct 23 '22 16:10

Rodger