PDA

View Full Version : rpm



ADJ
2nd November 2006, 02:18 PM
Hey,

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?

Thanks

IBBoard
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
or
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 :)

ADJ
2nd November 2006, 02:45 PM
Thanks!

I have to learn reading again I think ;)

Jman
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.