[CentOS] determining what depends on a rpm

Phil Perry pperry at elrepo.org
Mon Dec 17 20:22:14 UTC 2018


On 17/12/2018 17:24, Simon Matter wrote:
>> On 12/17/18 3:50 AM, Leon Fauster via CentOS wrote:
>>>
>>> or this one :-)
>>> rpm -ev --test PACKAGENAME
>>> will list all packages that require PACKAGENAME
>>
>>
>> True.  I considered that, and then decided that I could never recommend
>> using "rpm -e" as a test, even with the --test flag, due to the risk of
>> operator error.  Though if you put it in an alias, I suppose that the
>> risk is minimal and the answer is simpler.  :)
> 
> It's not really dangerous even without --test, because if it has
> dependencies the remove is not done, you just get an error.
> 

And further, the OP originally asked for a solution which could be run 
as a non-root user (otherwise yum erase PACKAGE would give the same 
answer), and when run as non-root, the transaction will fail and nothing 
can be removed anyway. So overall I think it's a pretty good solution to 
the OPs question.




More information about the CentOS mailing list