Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I know rpm -qR package_name will list the packages that package_name depends on. I'm trying to determine if there is a way to list the packages that depend on package_name?
Before I remove a package, I would like to determine if any other packages depend on it.
If the system uses yum (current RH variants), the you can use yum remove package. It will list everything that is to be removed and give you a y/n on whether to continue.
You really should tell us what distro, version, and arch whenever you ask a question. Otherwise it is really tough to be of any real assistance.
Sorry, I thought it was just a generic rpm question. My versions are RHEL 3,4, and 5.
I don't think --test or --whatrequires will do it. I think --test just tests the rpm package for completeness and/or errors. Whatrequires I think will give me an option, but it doesn't take a package name as an argument, but rather a capability. So, if I'm trying to find out if any other packages depend on /usr/jdk1.3/bin/java, it looks like:
rpm -q --whatrequires /usr/jdk1.3/bin/java
will tell me. Unfortunately, no yum servers on this network.
The problem is that the --whatrequires <package> output lists a group of packages and each of them can be required from other packages and so on. So that it is difficult to retrieve the complete chain of dependencies using this method. The method suggested by lazlow perhaps is the most complete:
Code:
# yum remove startup-notification
<omitted>
--> Finished Dependency Resolution
Dependencies Resolved
========================================================================================================================
Package Arch Version Repository Size
========================================================================================================================
Removing:
startup-notification i386 0.8-4.1 installed 67 k
Removing for dependencies:
ImageMagick i386 6.2.8.0-4.el5_1.1 installed 11 M
ImageMagick-perl i386 6.2.8.0-4.el5_1.1 installed 307 k
NetworkManager-gnome i386 1:0.7.0-4.el5_3 installed 891 k
alacarte noarch 0.10.0-1.fc6 installed 604 k
bluez-gnome i386 0.5-5.fc6 installed 43 k
bluez-utils i386 3.7-2.2.el5.centos installed 778 k
control-center i386 1:2.16.0-16.el5 installed 8.1 M
desktop-printing i386 0.19-20.2.el5 installed 259 k
dogtail noarch 0.6.1-2.el5 installed 667 k
eel2 i386 2.16.1-1.el5 installed 1.1 M
ekiga i386 2.0.2-7.0.2 installed 11 M
eog i386 2.16.0.1-6.el5 installed 1.8 M
esc i386 1.0.0-39.el5 installed 1.1 M
evince i386 0.6.0-8.el5 installed 2.7 M
evolution i386 2.12.3-8.el5_2.3 installed 36 M
evolution-connector i386 2.12.3-4.el5_2.1 installed 2.3 M
evolution-data-server i386 1.12.3-10.el5_3.3 installed 11 M
evolution-data-server i386 1.12.3-6.el5_2.3 installed 11 M
evolution-webcal i386 2.7.1-6 installed 265 k
file-roller i386 2.16.0-2.fc6 installed 3.5 M
firefox i386 3.0.10-1.el5.centos installed 14 M
firstboot i386 1.4.27.7-1.el5.centos installed 966 k
firstboot noarch 1.4.27.3-1.el5.centos installed 974 k
gcalctool i386 5.8.25-1.el5 installed 4.1 M
gconf-editor i386 2.16.0-3.el5 installed 852 k
gdm i386 1:2.16.0-46.el5.centos installed 10 M
gdm i386 1:2.16.0-47.el5.centos installed 10 M
gedit i386 1:2.16.0-9.el5 installed 17 M
gimp i386 2:2.2.13-2.0.7.el5 installed 25 M
gimp-data-extras noarch 2.0.1-1.1.1 installed 7.6 M
gimp-help noarch 2-0.1.0.10.1.1 installed 64 M
gimp-print-plugin i386 4.2.7-22 installed 95 k
gimp-print-plugin i386 4.2.7-22.2.el5 installed 95 k
gnome-applet-sensors i386 1.7.10-1.el5.rf installed 234 k
gnome-applets i386 1:2.16.0.1-19.el5 installed 31 M
gnome-desktop i386 2.16.0-1.el5.centos.1 installed 1.9 M
gnome-games i386 1:2.16.0-1.fc6 installed 19 M
gnome-games i386 1:2.16.0-2.el5 installed 19 M
gnome-media i386 2.16.1-3.el5 installed 5.2 M
gnome-mount i386 0.5-3.el5 installed 228 k
gnome-netstatus i386 2.12.0-5.el5 installed 972 k
gnome-panel i386 2.16.1-7.el5 installed 10 M
gnome-pilot i386 2.0.13-16 installed 1.7 M
gnome-power-manager i386 2.16.0-9.el5 installed 6.1 M
gnome-power-manager i386 2.16.0-10.el5 installed 6.1 M
gnome-python2 i386 2.16.0-1.fc6 installed 588 k
gnome-python2-applet i386 2.16.0-2.el5 installed 16 k
gnome-python2-bonobo i386 2.16.0-1.fc6 installed 167 k
gnome-python2-canvas i386 2.16.0-1.fc6 installed 45 k
gnome-python2-desktop i386 2.16.0-2.el5 installed 234 k
gnome-python2-extras i386 2.14.2-6.el5 installed 62 k
gnome-python2-gconf i386 2.16.0-1.fc6 installed 71 k
gnome-python2-gnomeprint i386 2.16.0-2.el5 installed 427 k
gnome-python2-gnomevfs i386 2.16.0-1.fc6 installed 163 k
gnome-python2-gtksourceview i386 2.16.0-2.el5 installed 347 k
gnome-python2-libegg i386 2.14.2-6.el5 installed 113 k
gnome-screensaver i386 2.16.1-8.el5 installed 3.3 M
gnome-session i386 2.16.0-6.el5.centos installed 1.3 M
gnome-spell i386 1.0.7-3.1 installed 258 k
gnome-system-monitor i386 2.16.0-3.el5 installed 2.9 M
gnome-terminal i386 2.16.0-3.el5 installed 8.4 M
gnome-terminal i386 2.16.0-5.3.el5 installed 8.4 M
gnome-utils i386 1:2.16.0-5.el5 installed 8.5 M
gnome-vfs2 i386 2.16.2-4.el5 installed 4.7 M
gnome-vfs2-smb i386 2.16.2-4.el5 installed 28 k
gnome-volume-manager i386 2.15.0-5.el5 installed 1.9 M
gok i386 1.2.0-2.el5 installed 9.2 M
gstreamer i386 0.10.9-3.el5 installed 1.4 M
gstreamer-plugins-bad i386 0.10.8-2.el5.rf installed 6.8 M
gstreamer-plugins-base i386 0.10.20-3.0.1.el5_3 installed 2.4 M
gstreamer-plugins-good i386 0.10.9-1.el5_3.1 installed 2.4 M
gstreamer-plugins-ugly i386 0.10.9-1.el5.rf installed 1.9 M
gthumb i386 2.7.8-8.el5 installed 5.6 M
gtkhtml2 i386 2.11.0-3 installed 431 k
gtkhtml3 i386 3.16.3-1.el5 installed 2.9 M
gtweakui i386 0.4.0-1.el5.rf installed 271 k
gucharmap i386 1.8.0-1.fc6 installed 5.8 M
hal-gnome i386 0.5.8.1-38.el5 installed 205 k
im-chooser i386 0.3.3-6.el5 installed 188 k
krb5-auth-dialog i386 0.7-1 installed 52 k
libbonoboui i386 2.16.0-1.fc6 installed 1.2 M
libgail-gnome i386 1.1.3-1.2.1 installed 60 k
libgnome i386 2.16.0-6.el5 installed 3.3 M
libgnomeui i386 2.16.0-5.el5 installed 3.1 M
libgsf i386 1.14.1-6.1 installed 258 k
libnotify i386 0.4.2-6.el5 installed 87 k
librsvg2 i386 2.16.1-1.el5 installed 425 k
libwnck i386 2.16.0-4.fc6 installed 517 k
libwpd i386 0.8.7-3.el5 installed 535 k
metacity i386 2.16.0-10.el5 installed 9.5 M
metacity i386 2.16.0-12.el5 installed 9.5 M
nautilus i386 2.16.2-7.el5 installed 12 M
nautilus-cd-burner i386 2.16.0-7.el5 installed 1.7 M
nautilus-extensions i386 2.16.2-7.el5 installed 31 k
nautilus-open-terminal i386 0.6-6.el5 installed 57 k
nautilus-sendto i386 0.7-6.el5.centos installed 156 k
nautilus-sendto i386 0.7-5.fc6 installed 172 k
notification-daemon i386 0.3.5-9.el5 installed 103 k
notify-python i386 0.1.0-3.fc6 installed 24 k
nspluginwrapper i386 0.9.91.5-22.el5 installed 302 k
openoffice.org-calc i386 1:2.3.0-6.10.el5 installed 20 M
openoffice.org-core i386 1:2.3.0-6.10.el5 installed 228 M
openoffice.org-draw i386 1:2.3.0-6.10.el5 installed 2.9 M
openoffice.org-graphicfilter i386 1:2.3.0-6.10.el5 installed 460 k
openoffice.org-impress i386 1:2.3.0-6.10.el5 installed 4.8 M
openoffice.org-math i386 1:2.3.0-6.10.el5 installed 3.4 M
openoffice.org-pyuno i386 1:2.3.0-6.10.el5 installed 438 k
openoffice.org-writer i386 1:2.3.0-6.10.el5 installed 7.2 M
openoffice.org-xsltfilter i386 1:2.3.0-6.10.el5 installed 257 k
orca i386 1.0.0-5.el5 installed 3.4 M
pirut noarch 1.3.28-13.el5.centos installed 1.4 M
planner i386 0.14.1-4.el5 installed 5.9 M
planner i386 0.14-3 installed 5.8 M
policycoreutils-gui i386 1.33.12-14.2.el5 installed 523 k
policycoreutils-gui i386 1.33.12-14.el5 installed 523 k
rhythmbox i386 0.11.6-4.el5 installed 12 M
sound-juicer i386 2.16.0-3.el5 installed 2.4 M
system-config-date noarch 1.8.12-3.el5.centos.2 installed 3.6 M
system-config-display noarch 1.0.48-2.el5 installed 786 k
system-config-keyboard noarch 1.2.11-1.el5 installed 193 k
system-config-network noarch 1.3.99.10-2.el5 installed 2.3 M
system-config-network noarch 1.3.99.12-1.el5 installed 2.3 M
totem i386 2.16.7-4.el5 installed 5.0 M
unoconv noarch 0.3-2.el5.rf installed 163 k
vino i386 2.13.5-6.el5 installed 1.1 M
xsane-gimp i386 0.991-5.el5 installed 619 k
xulrunner i386 1.9.0.10-1.el5 installed 24 M
xulrunner-devel i386 1.9.0.10-1.el5 installed 36 M
yelp i386 2.16.0-22.el5 installed 2.0 M
Transaction Summary
========================================================================================================================
Install 0 Package(s)
Update 0 Package(s)
Remove 130 Package(s)
Is this ok [y/N]: N
This tells you that it is not a good idea to remove startup-notification from your system!
Interesting. I see what I was doing wrong with the whatrequires. I did for example:
rpm -qa | grep glibc
and saw glibc-2.5-12 listed. So I then did:
rpm -q --whatrequires glibc-2.5-12 and got back no package requires glibc-2.5-12. When I changed that to rpm -q --whatrequires glibc, I received a list of packages.
I think this will do to start. I'm just trying to determine if any package depends on another one. If not and the developers aren't using it, I'm just going to remove it.
Yes. It accepts the package name but not the version number. Anyway, it is not an easy task, due to the huge chain of dependencies: if you check one package you have to check all the package which depends on it, then all the package which depends on them and so on. If you have a little list of package not used by developers you can do that manually using the yum remove <package> method (which does the recursion for you) otherwise... it should be a panic!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.