Google Site SearchFN Site Search FN Blog Login FN Blog Login
Site Navigation:
 
 

All you have to know about RPM

by Alexandre de Abreu

How can I remove a package? Is it going to remove any dependencies?

For simply remove a package do:

rpm -e package

Where "-e" is the Erase parameter and "package.rpm" is the RPM you're removing. Note that you can also Simulate what will be done and Backup the package. The commands are, respectively:

rpm -e --test package

rpm -e --repackage package

If another package(s) depends on it, RPM will not permit the erase. You can see a list of packages that requires the RPM package you're trying to erase by executing:

rpm -q --whatrequires kernel

In this case it will print the packages that depends on Kernel, here's a sample output:

# rpm -q --whatrequires kernel
prelink-0.3.0-13
tcpdump-3.7.2-7.1
iptables-1.2.9-1.0
nfs-utils-1.0.6-1
libpcap-0.7.2-7.1
rp-pppoe-3.5-8
kernel-pcmcia-cs-3.1.31-13
vconfig-1.8-1
sndconfig-0.70-2
pciutils-2.1.10-8
quota-3.06-11

So if are erasing a package, first try to find out what package(s) depends on it and possibly remove them. Forget the danger parameters "--nodeps" and "--force". Almost everything can be done without these parameters.