?
Solved

rpm -e does not work

Posted on 2000-05-13
8
Medium Priority
?
177 Views
Last Modified: 2013-11-13
If I install a program with:
rpm -Uvh program-name.rpm
Then I do -i program-name.rpm
I get an error that the program is already installed.
Then I do a:
rpm -evh program-namr.rpm
and it says the program is not installed.
Why can I not uninstall programs installed with rpm?
0
Comment
Question by:davidpm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 1

Expert Comment

by:raks04
ID: 2807988
Check if the "program-name" is the exactly as the ones u have used before for upgrading or installing.
0
 

Author Comment

by:davidpm
ID: 2808363
It is exactly the same because I'm just using the up arrow and editing the install command to be a -e command
0
 
LVL 40

Accepted Solution

by:
jlevie earned 150 total points
ID: 2808532
The rpm -e is probably failing because the name of the rpm file is not the same as the name the package is installed as. Use "rpm -q package" to find out what the installed name is and use that in the "rpm -e" command.
0
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 

Author Comment

by:davidpm
ID: 2808852
Hi jlevie your back and got me going in the right direction.
I usually use -U to install instead of -i, I heard it was safer as it unintalls old versions
Here is what I found out.
If to install a package I use:
rpm -Uvh samba*
it installs three packages. samba, samba-client, and samb-common.
If I run
rpm -e samba-2.0.5a-12.i386.rpm  it says samba-2.0.5a-12.i386.rpm is not installed.
If I Run rpm -Uvh samba* it says
samba-2.0.5a-12 is already installed.
Now I know the real name of the installed package which is not the same as rpm file name.
rpm -e samba-2.0.5a-12 does work
Also rpm  -qa |grep samba will give me the real name of the package

I did not however work out any syntex of the form rpm -q package-name that works unless I knew the actual package name which I do not as I only have the rpm file name.
0
 

Author Comment

by:davidpm
ID: 2808857
After reading this I suppose I could guess that the rpm installed name is just the rpm file name less the .i386.rpm but I do not know if that is true in all cases
0
 
LVL 40

Expert Comment

by:jlevie
ID: 2809143
Yes, -U is safer, especially when you may have that package already on the system. Also -F is better applying a series of updates. In that case the package will only be upgraded if it's already installed on the system.

And yes, while the installed name is typically similar to the the rpm file name, there's no requirement for it to be similar (or even related). As far as "rpm -U|-F|-i" is concerned the rpm file used to install, say Samba, could be named "yes-you-really-want-this". As long as the contents were a valid rpm, the parts of Samba would be installed and the package names contained within the rpm (samba, samba-client, samba-common) would be what you'd see if you did an "rpm -qa".
0
 

Author Comment

by:davidpm
ID: 2809308
Thanks for the confermation.
Tricky those RedHat guys.
0
 
LVL 40

Expert Comment

by:jlevie
ID: 2809371
Actually it makes a lot of sense although the advantages might not be obvious on first glance. Suppose that you had downloaded the rpm file using something that can't preserve the real file name. Perhaps a windows box that mangled the original name. You'd have to copy it to Linux and rename the file to be exactly as it was originally. The way it's don it doesn't matter what the file name is, the packages will still be installed correctly.

As an aside, Sun and SGI do exactly the same thing with their package system. The filenames aren't required to match the installed package names. That information is encoded into the package itself so it always comes out right.
0

Featured Post

CHALLENGE LAB: Troubleshooting Connectivity Issues

Goal: Fix the connectivity issue in the lab's AWS environment so that you can SSH into the provided EC2 instance.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question