Problem when trying to remove a package using rpm command - error: package is not installed


 
Thread Tools Search this Thread
Homework and Emergencies Emergency UNIX and Linux Support Problem when trying to remove a package using rpm command - error: package is not installed
# 1  
Old 03-29-2012
Problem when trying to remove a package using rpm command - error: package is not installed

Hello,

i have installed a package by using the command

Code:
sudo rpm -i filepackage.rpm
        package filepackage is already installed

when i try to remove it, i get an error saying "is not installed":


Code:
sudo rpm -e filepackage.rpm
error: package filepackage is not installed

How can i remove the rpm package and how can i be sure
that it is already installed?

Is there any other command?

Thanks, in advance
# 2  
Old 03-29-2012
Code:
rpm -qa | grep filepackage

When you get the output with the name of the package, remove it (notice no rpm extension in output)
Code:
rpm -e filepackage

# 3  
Old 03-29-2012
Thanks for replying,

it actually worked.

I executed the following command without the ".rpm" extension:

Code:
rpm -e filepackage
warning: /etc/hd/env.sh saved as /etc/hd/env.sh.rpmsave

What does the previous warning mean?Is that going to cause me any problem?

However, when i executed the following command, i didn't see anything in the output, the output was empty.Was that ok?

Code:
rpm -qa | grep filepackage


But what about the location of the ".rpm" contents of the package?
Can i define in the rpm command where i would like the package to be installed?

Cause i have downloaded it in the /usr/test directory.
And i noticed that the package was installed in the /usr directory
and not in /usr/test directory

Why does this happen?
And how can i define the location of the installation of an rpm package?

Thanks, in advance
# 4  
Old 03-29-2012
Quote:
Originally Posted by g_p
Thanks for replying,
Code:
rpm -e filepackage
warning: /etc/hd/env.sh saved as /etc/hd/env.sh.rpmsave

What does the previous warning mean?Is that going to cause me any problem?
That is normal. Configuration files are normally saved and given a .rpmsave extension.

Quote:
However, when i executed the following command, i didn't see anything in the output, the output was empty.Was that ok?

Code:
rpm -qa | grep filepackage

Again that is normal. Linux follows the Unix philosophy of not outputting anything unless error or required.

Quote:
But what about the location of the ".rpm" contents of the package?
Can i define in the rpm command where i would like the package to be installed?

Cause i have downloaded it in the /usr/test directory.
And i noticed that the package was installed in the /usr directory
and not in /usr/test directory

Why does this happen?
And how can i define the location of the installation of an rpm package?
Read the rpm manpage. Especially section detailing --prefix.
# 5  
Old 04-04-2012
I have faced the same problem, follow the command
1-updatedb
2-init 6
3-rpm -ivh package.rpm(if it is already installed)
then
1-init 6
2-rpm -e package.rpm(e for remove the package (it work in redhat only))
3-updatedb (to send a message to update the kernel entry)
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Does not appear to be a RPM package

Hi Guys I got this error when I try to install perl-5.24.0-1.aix6.1.ppc.rpm package rpm -ivh perl-5.24.0-1.aix6.1.ppc.rpm error: perl-5.24.0-1.aix6.1.ppc.rpm does not appear to be a RPM package (4 Replies)
Discussion started by: khaled_ly84
4 Replies

2. Red Hat

Build Rpm package

Hi Everybody, I would like to know how to build an RPM package. Could you please let me know how to do it with the procedure. Regards, Mastan (1 Reply)
Discussion started by: mastansaheb
1 Replies

3. Red Hat

I can't remove rpm package

Hello!, I can't remove a rpm package with rpm -e net-snmp Nothing happened, and the process returns D status when i see with ps aux | grep rpm. When i say "Nothing Happened", the terminal don't return any message, and not remove the package. What can I do to remove? Ps: I work with Red... (1 Reply)
Discussion started by: Douglas Ramalho
1 Replies

4. UNIX for Dummies Questions & Answers

Can't install rpm package with --prefix in new path.Error: package is not relocatable

Hello, i have downloaded an rpm package "hadoop-0.20.205.0-1.amd64.rpm" in /usr/local/ directory. I'm trying to install the rpm package in a new path/location (/usr/local/hadoop-0.20.205), but i can't. I did: 1st try: Didn't work sudo rpm -i --prefix=/usr/local/hadoop-0.20.205... (1 Reply)
Discussion started by: g_p
1 Replies

5. Linux

How install a new package without remove old package?

Dear all, I would like to install a new version of package without remove old version on Centos and vice versa. Please give me advice! thanks much, (2 Replies)
Discussion started by: all4cfa
2 Replies

6. UNIX for Advanced & Expert Users

How to find dependancies of .dstream package (Solaris) & .rpm package( linux)

Friends, Please let meknow, How we can find the dependancies of .dstream package & .rpm package before installation ? For AIX, We can use the inutoc . command to create the .toc file for the bff package, What about Solaris & Linux ? (0 Replies)
Discussion started by: yb4779
0 Replies

7. Red Hat

RPM package installation

Hi, can someone help me with this? How do we apply a new version of s/w package without disrupting the processes & daemons running with the old version? Thanks (1 Reply)
Discussion started by: naan
1 Replies

8. Linux

RPM Package question

Hi, I have built one RPM last year. now we have another version of that RPM. in previous release we had few extra files then now. so when user upgrade it those files get deleted by RPM package. We want to retain those files. now for workaround i thought of backing up those file during... (0 Replies)
Discussion started by: ajayyadavmca
0 Replies

9. Ubuntu

Rpm package

Hi All, I just recently installed UBUNTU 2.6.24-16 and i installed my phone software which is a RPM package (it's a similiar package with MSN). The software called MXIE. I managed to install it successfully but i can't run the software. When i try to run it, i received... (8 Replies)
Discussion started by: c00kie88
8 Replies

10. Linux

how to restore original package after uninstalling the upgraded package using rpm

have following package installed rpm -qa |grep ADMIN It will give the following package installed: ADMIN-4.0.0.1 Now I will upgrade the ADMIN package using the following command. rpm --upgrade ADMIN-4.1.0.1 It will upgrade the ADMIN packagge to ADMIN-4.1.0.1 Now I want that... (0 Replies)
Discussion started by: amitpansuria
0 Replies
Login or Register to Ask a Question