[rhn-users] a specific rpm --query mode.
Christopher L. Barnard
cbarnard at rush.edu
Fri Mar 27 17:07:48 UTC 2009
On Fri, 2009-03-27 at 09:54 -0600, Stephen John Smoogen wrote:
> On Fri, Mar 27, 2009 at 8:33 AM, Christopher L. Barnard
> <cbarnard at rush.edu> wrote:
> > I think an RPM is not used, so I want to delete it. But before I do I
> > want to find out if any other RPMs that are installed rely upon it. I
> > can use rpm --query --requires RPMNAME to find out what other RPMs must
> > be installed for RPMNAME to work. But what I am looking for is a way to
> > find out if other RPMs rely on RPMNAME being there. How would I do
> > this? I do not see the option in the rpm man page or a google search...
>
> Well the real ugly way is rpm -e and see what complains :). There is the
>
> rpm -q --whatrequires <CAPABILITY> which should help
>
> [smooge at bakeneko Desktop]$ rpm -q --whatrequires passwd
> usermode-1.99-3.x86_64
> [smooge at bakeneko Desktop]$ rpm -q --whatprovides passwd
> passwd-0.76-2.fc11.x86_64
>
> Hope this helps.
>
It looks like this does to some extent. I can write a script that does
a '--whatrequires' for all of the files in the rpm I want to delete.
It appears that
rpm --query --whatprovides /fully/pathed/file/name and
rpm --query --file /fully/pathed/file/name
do exactly the same thing. Or am I missing something?
Christopher
More information about the rhn-users
mailing list