Ask Your Question

What is the difference between yum-plugin-remove-with-leaves and clean_requirements_on_remove?

asked 2014-05-06 01:58:53 -0500

updated 2014-05-06 02:07:11 -0500

I was wondering what is the difference between plugin yum-plugin-remove-with-leaves and /etc/yum.conf option clean_requirements_on_remove.


When removing packages (by removal, update or obsoletion) go through each package's dependencies. If any of them are no longer required by any other package then also mark them to be removed.  Boolean (1, 0, True, False, yes, no) Defaults to False


This extension removes unused dependencies which have been incorporated by an installation package that would otherwise not be removed. Helps maintain a system clean of libraries and unused packages.

There's also the remove_leaf_only configuration changes the behaviour of this command to only remove packages which aren't required by something else. And the clean_requirements_on_remove configuration changes the behaviour of this command to also remove packages that are only dependencies of this package. The language is very vague.



edit retag flag offensive close merge delete


Consider asking this question at

marcindulak gravatar imagemarcindulak ( 2014-05-12 04:55:03 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2014-06-04 02:12:02 -0500

hedayat gravatar image

remove_leaf_only: does NOT let you remove packages which are needed by other packages. clean_requirements_on_remove: should work just like the plugin. but it is a relatively new option and it didn't exist before, so the plugin was needed.

Finally, you can use yum autoremove instead of yum remove if you don't want to always enable clean_requirements_on_remove. yum autoremove is like running yum remove with clean_requirements_on_remove enabled.

edit flag offensive delete link more


I wish Fedora was more pro-active in removing deprecated features, instead of maintaining cruft like update and upgrade or remove or erase, and maintained a proper coherent documentation of all the features.

sudhirkhanger gravatar imagesudhirkhanger ( 2014-06-05 00:24:47 -0500 )edit

@donniezazen - please file a bug against anything at that you find confusing or outdated, it helps.

randomuser gravatar imagerandomuser ( 2014-06-10 00:09:19 -0500 )edit

answered 2014-06-01 21:34:47 -0500

updated 2014-08-09 02:20:13 -0500

I have been using clean_requirements_on_remove=1 in my /etc/yum.conf which seems to be doing what I intend it to do without intrusively removing anything I don't want.

Update:- yum-plugin-remove-with-leaves adds two options to remove - --leaves-exclude-bin and --remove-leaves. You will have to explicitly call them. You can also set to remove always/etc/yum/pluginconf.d/remove-with-leaves.conf. This would not be required with clean_requirements_on_remove=1 which will always remove unused leaves.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-05-06 01:58:53 -0500

Seen: 4,258 times

Last updated: Aug 09 '14