Ask Your Question
2

How to remove unneeded dependencies of a package?

asked 2014-01-02 09:49:34 -0600

Black_Bucket gravatar image

Hello. I want to know how to remove dependencies of a given packages that are not used anymore by the system. Usually what I do is sudo yum remove package_name, but this only removes package_name and not all the stuff it installed with it. For example, yesterday I installed exaile and yum installed three additional packages that were needed for exaile to run. But when I removed it, yum just removed the package exaile and not its dependencies.

Thanks.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2014-01-02 11:05:28 -0600

Period 22 gravatar image

updated 2014-01-02 12:05:59 -0600

Use sudo yum autoremove. That does the job nicely.

edit flag offensive delete link more

Comments

@Period It worked perfectly. I did a little research and found that package-cleanup is a bit unreliable. On the other hand yum autoremove works as if you had enabled clean_requirements_on_remove, which is a feature added by Seth Vidal to yum for taking care of 'leaf packages'. Thanks.

Black_Bucket gravatar imageBlack_Bucket ( 2014-01-02 14:55:39 -0600 )edit

This worked for me, thank you very much, +1

490182 gravatar image490182 ( 2014-11-26 23:41:51 -0600 )edit
1

answered 2014-01-02 10:00:56 -0600

Use package-cleanup. For example,

package-cleanup --leaves

edit flag offensive delete link more

Comments

@randomuser Okay but the command just lists the unneeded packages. Do I have to uninstall them manually?

Black_Bucket gravatar imageBlack_Bucket ( 2014-01-02 10:31:50 -0600 )edit

sorry, there is no yum autoremove commander!!!

Charles Wang gravatar imageCharles Wang ( 2014-01-02 18:35:31 -0600 )edit

yum autoremove is a good answer, but it doesn't do anything about the existing leaves, just the ones that would be created at that time. package-cleanup does remove dupes automatically, but it has no way to tell if your leaves are something that you, as a user, are interested in - so yes, you have to manually remove the items on the list. `yum remove $(package-cleanup --leaves) would do, if you've reviewed the whole list.

randomuser gravatar imagerandomuser ( 2014-01-02 22:19:43 -0600 )edit

I usually use yum history. Find the transaction id: 'yum --setopt=history_list_view=commands history' then 'yum history undo ID'

Ahmad Samir gravatar imageAhmad Samir ( 2014-01-04 03:40:37 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2014-01-02 09:49:34 -0600

Seen: 14,050 times

Last updated: Jan 02 '14