Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I believe I have installed multiple packages that use the same shell command to run. I know one of them, but I only vaguely recall installing the other and thus cannot uninstall it. I believe they're causing issues with each other, so I need to uninstall the one that I can't remember. Is there a simple way to find which package is invoked using a certain shell command? This is on RHEL 6.5.

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

Try:

yum whatprovides <command>

From man yum:

provides or whatprovides
              Is used to find out which package provides some feature or file.
              Just use a specific name or a file-glob-syntax wildcards to list
              the packages available or installed that provide that feature or
              file.

Example:

yum whatprovides /bin/ls
coreutils-5.97-34.el5_8.1.x86_64 : The GNU core utilities: a set of tools
                                 : commonly used in shell scripts
Repo        : base
Matched from:
Filename    : /bin/ls



coreutils-5.97-34.el5_8.1.x86_64 : The GNU core utilities: a set of tools
                                 : commonly used in shell scripts
Repo        : installed
Matched from:
Other       : Provides-match: /bin/ls
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.