orphaned dep cleanup in yum
November 9, 2010
I just checked this into yum on friday. It’s currently defaulting to off but I wanted to mention it so it gets more testing.
if you set:
clean_requirements_on_remove = 1
in your yum.conf under [main]
or use:
–setopt=clean_requirements_on_remove=1
on the command line, then yum will remove no-longer-needed dependencies of pkgs that you are removing from your system.
Yum was sorta able to do this with the remove-with-leaves plugin but remove-with-leaves did kinda a poor job of it and we weren’t using the ‘reason’ info we’re now storing in the yumdb to know what is a dep and what is not.
Now we are. I’ve tested this in some kinda bizarre scenarios and it seems to work right but I’d appreciate more testing.
Yum that went into rawhide today (3.2.28-13) has this patch and testing (and filing bugs) is appreciated.
Thanks
November 10, 2010 at 12:04 am
That’s great news, thanks! Once proven stable will this feature become available in F14 too?
November 10, 2010 at 2:37 am
Send a note to users and test list and then noticed that yum-rawhide repo perhaps isn’t fully updated. Would be nice to get that updated for easy testing
November 10, 2010 at 2:58 am
[…] I’m very happy to discover that Seth Vidal has merged orphaned dependency cleanup on removal into Yum. […]
November 10, 2010 at 4:18 pm
This is a great feature, Seth. Thanks for adding it!
November 11, 2010 at 1:53 am
[…] so grateful for this work – it’s something I’ve been crying out for ever since I made the decision to stick […]
November 11, 2010 at 2:04 am
So far so good.. Thank you so much for this feature!
-c
November 12, 2010 at 3:33 pm
Good stuff. This is very helpful. I look forward to turning it on.
Is there a way to retroactively remove no-longer-needed dependencies for long-since removed applications?
November 12, 2010 at 3:47 pm
I’d recommand package-cleanup –leaves
that’ll give you the list of pkgs that are not required by anything else.
November 14, 2010 at 4:52 pm
Just a question, i installed VLC and its downloaded 38 packages as dependencies, now when i’m trying to remove VLC its just listing 17 packages as dependences for VLC.
So here is the question that the difference between install and erase call was around 3 hrs, so where are the other packages not getting depended upon. They were not needed earlier, but all of a sudden now they are needed.
I expected all of the 38 to be listed for removal, can u please explain where are the others left out.
November 14, 2010 at 6:02 pm
I need a lot more information to debug that.
1. make sure you’re using the new yum
2. make sure you have the option enabled.
after that file a bug with the complete set of info.
ideally the yum history output of that will help figure out the debug.
Now, to your specific question: it is possible that you had broken dependencies on your system before installing vlc that those pkgs satisfy deps for.
November 15, 2010 at 6:12 pm
https://bugzilla.redhat.com/show_bug.cgi?id=653583
December 9, 2010 at 10:01 am
Hi Seth,
Any idea whether this might make it into Fedora 14, or only Fedora 15?
Thanks,
Chris
February 24, 2011 at 7:41 am
thanks, exactly what I am looking for. got some strange stuff going on here! proftpd and centos do not play well
October 10, 2011 at 6:22 pm
Is there a way to get a list of manually installed packages?
I vaguely remember installing all sorts of media player/codec stuff on a CentOS 5 server once to try something on the GUI and would love to remove those apps along with their dependencies again.
yum.log doesn’t nearly go back far enough and I have not found any way to get a list of manually installed software that doesn’t include tons of dependencies which were pulled in.
Is there any way to find out what apps were manually installed over the lifetime of the system (not including the base packages of the system and not including dependencies)?
I’ve searched a lot and found nothing.
November 22, 2012 at 10:57 am
Will it work on rhel/centos 6 as well?
June 5, 2013 at 3:34 pm
Thank you very much!!!!!!
July 10, 2013 at 12:02 pm
Hi, is it possible tell yum to ignore a certain unused dep with “clean_requirements_on_remove=1”?
Ex. on F19, “yum remove rsyslog” will remove logrotate, but I want it. Of course I can after run “yum install logrotate” again, but perhaps there’s some switch to tell yum do keep it installed.
Thanks!