RPM thinks something is removed: can't remove, yet thinks something is installed: can't installed

2

When I attempt to install a package, rpm tells me that it's already installed. When I try to remove that same package, it tells me that it's not installed. Forcing installation fails (presumably because it's already installed), removal cannot be forced. Any idea what's going on here?

[ecarroll@x200s extensions]$ sudo rpm -i /home/ecarroll/Downloads/gnome-shell-frippery-0.1.0-1.noarch.rpm
warning: /home/ecarroll/Downloads/gnome-shell-frippery-0.1.0-1.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 39256cb2: NOKEY
    package gnome-shell-frippery-0.1.0-1.noarch is already installed
[ecarroll@x200s extensions]$ sudo rpm -e /home/ecarroll/Downloads/gnome-shell-frippery-0.1.0-1.noarch.rpm
error: package /home/ecarroll/Downloads/gnome-shell-frippery-0.1.0-1.noarch.rpm is not installed

Force install:

[ecarroll@x200s extensions]$ sudo rpm --force -i /home/ecarroll/Downloads/gnome-shell-frippery-0.1.0-1.noarch.rpm
warning: /home/ecarroll/Downloads/gnome-shell-frippery-0.1.0-1.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 39256cb2: NOKEY
[ecarroll@x200s extensions]$ sudo rpm -e /home/ecarroll/Downloads/gnome-shell-frippery-0.1.0-1.noarch.rpm
error: package /home/ecarroll/Downloads/gnome-shell-frippery-0.1.0-1.noarch.rpm is not installed

Force remove:

[ecarroll@x200s extensions]$ sudo rpm --force -e /home/ecarroll/Downloads/gnome-shell-frippery-0.1.0-1.noarch.rpm
rpm: only installation and upgrading may be forced

Evan Carroll

Posted 2011-05-30T00:29:59.580

Reputation: 1

I'm sure you think what you posted is nice, but its not helpful to the rest of us... Please ask a clear question as opposed to insults. – soandos – 2011-05-30T00:33:55.260

And its a duplicate to boot. – soandos – 2011-05-30T00:36:47.940

It's not a duplicate, the first one was closed. – Evan Carroll – 2011-05-30T00:37:38.087

I edited the question substantially so that it's more clear. I think you'll have a lot easier time getting help when you clearly state your problem in plaintext, a lot of people skip over output quotes when they first skim a question so they wouldn't have seen what was going on here. Also, berating the site administrators, while within your rights, generally won't get you anywhere. – jcrawfordor – 2011-05-30T00:40:59.610

1That said, I don't see that this is a bad question. It's a real misunderstanding of the tool that a lot of people probably run in to and look for a solution to. Sure it's PEBKAC, but virtually everything here is - people ask questions here when they're having trouble using something, that's what the site is for. – jcrawfordor – 2011-05-30T00:42:23.943

@jcrawfordor I don't follow why this one was edited while the other was closed. In addition, I do not believe that by virtue of having the same question closed before makes it not a duplicate (though I am not sure about that) – soandos – 2011-05-30T00:44:44.927

Why the other one was Not a question per the Administrators. Ipso facto, this one was a soluble question. The administrators can't be wrong: so this must not be the same question. – Evan Carroll – 2011-05-30T00:51:08.433

1@soandos I have no idea on either point (I'm not a mod). It was closed as nonquestion, but I think if you read the output the issue is obvious (it could have been clearer, but it was there). Perhaps it's not obvious to some people that are familiar with RPM, since it is normal behavior, but I think it's apparent enough that it saying something was installed and then saying it isn't installed would cause confusion. It was only a few sentences edit to clear it up, in any case. As far as duplicate... I don't know. I think this question deserves a chance to live, though. – jcrawfordor – 2011-05-30T00:51:40.557

Answers

5

Packages that are installed are not referred to by the package filename, you must use their name, version, etc. to refer to them. You can get said information by running rpm -qp against the respective package file.

TL;DR: The problem isn't rpm, it's you.

Ignacio Vazquez-Abrams

Posted 2011-05-30T00:29:59.580

Reputation: 100 516

That actually worked rpm -e gnome-shell-frippery-0.1.0-1.noarch – Evan Carroll – 2011-05-30T00:38:44.170

1@Evan: be sure to mark this answer as correct. doing so will help generate a little good will. – jcrawfordor – 2011-05-30T00:56:41.613

Fixed. and fixed. I had the intention of marking this as accepted but the gimpy throttle in superuser wouldn't permit it just yet. – Evan Carroll – 2011-05-30T03:37:51.767