View Full Version : rpm

2nd November 2006, 02:18 PM

Sometimes after installing a package with rpm -ihv xxx.rpm it is not possible to remove it with rpm -e xxx.rpm.
rpm -e xxx.rpm gives "error: xxx.rpm is not installed". When you then try to install it again you get "package xxx is already installed".

So how can I remove a package that is at the same time installed and not installed?


2nd November 2006, 02:27 PM
"rpm -e" normally expects a package name rather than a file name. I've not found a hard and fast rule yet, but try removing sections from the end of the file until it works :)

e.g. for file-2.5.6.i386.rpm try:
rpm -e file-2.5.6.i386
rpm -e file-2.5.6

Most should work on the second one, but some might need the first (I can't say I've done much command-line uninstalling recently)

Alternatively, just do "rpm -qa|grep file" (where "file" is the start of your file name) and it'll list the installed packages matching that name. rpm -e that exact line and it should be fine :)

2nd November 2006, 02:45 PM

I have to learn reading again I think ;)

4th November 2006, 02:31 AM
For reading material I suggest the yum man page. A
yum remove file should work out the versions and dependencies automatically.