Dave's Brain

Browse - computer tips - rpm what uses a package

Date: 2010jun29
OS: Linux
Product: rpm

Q.  What other packages need/use this package?

A.  You need to see what capabilities the package gives and then
what packages use those.

Save this script as /usr/local/bin/rpm_what_uses

	#!/bin/sh
	
	PACKAGE=$1
	
	(
		echo $PACKAGE
		rpm -q --provides $PACKAGE
	) | while read CAP; do
		rpm -q --whatrequires "$CAP"
	done | grep -v 'no package requires'

Example use:

	% rpm_what_uses curl
What this info useful to you? You can donate to say thanks

Add a comment

Sign in to add a comment
Copyright © 2008-2012, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.