Sometimes when you are trying to uninstall or upgrade some software on a Linux machine you run into dependency related issues. Just about everyone I know who works with RPM based distributions has experienced what is known as “rpm hell” or “dependency hell” at one time or another. Here’s something to help you a bit if you are stuck in one of those situations.
Let’s look at how to check what files an installed RPM depends on.
Say you are trying to upgrade or uninstall the RPM of sendmail from your Linux computer. You might run into dependency issues when you run the uninstall command:
# rpm -e sendmail-8.13.1-3.2
In such a case it might be useful to take a look at what files this package depends on. Use the following command:
# rpm -qR sendmail-8.13.1-3.2
/bin/bash
/bin/mktemp
/bin/sh
/bin/sh
/bin/sh
/bin/sh
/bin/sh
/usr/sbin/alternatives
/usr/sbin/useradd
bash >= 2.0
chkconfig >= 1.3
config(sendmail) = 8.13.1-3.2.el4
cyrus-sasl
fileutils
gawk
libc.so.6
libc.so.6(GLIBC_2.0)
libc.so.6(GLIBC_2.1)
…
Now you can see a list of files that the sendmail package depends on and you’ll be better equipped to debug the failed uninstallation process.