Bug 477503

Summary: Yum does not support removing unneeded dependencies.
Product: [Fedora] Fedora Reporter: Richard <personificator>
Component: yumAssignee: Seth Vidal <skvidal>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 10CC: ffesti, james.antill, katzj, pmatilai, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: All Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-12-21 07:36:26 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Richard 2008-12-21 05:02:51 UTC
Description of problem:
Yum does not support removing unneeded dependencies. 

Version-Release number of selected component (if applicable):
Any

How reproducible:
This reproducible with installation of most packages that requires 1 or more dependencies.


Steps to Reproduce:
1.`yum install xorg-x11-server-devel`
The following output is produced.
Running Transaction
  Installing     : libpciaccess-devel                       1/10 
  Installing     : xorg-x11-util-macros                     2/10 
  Installing     : pixman-devel                             3/10 
  Installing     : libxcb-devel                             4/10 
  Installing     : libXau-devel                             5/10 
  Installing     : xorg-x11-proto-devel                     6/10 
  Installing     : libXdmcp-devel                           7/10 
  Installing     : xorg-x11-server-devel                    8/10 
  Installing     : mesa-libGL-devel                         9/10 
  Installing     : libX11-devel                             10/10

2. `yum remove xorg-x11-server-devel`
The following is produced.
Erasing          : xorg-x11-server-devel                    1/1

Additional info:
With the package yum-remove-with-leaves-1.1.18-2.fc10.noarch
 installed, the following output is produced with `yum remove x11-xorg-server-devel`:

  Erasing        : xorg-x11-filesystem                      1/5 
  Erasing        : pixman-devel                             2/5 
  Erasing        : libpciaccess-devel                       3/5 
  Erasing        : xorg-x11-util-macros                     4/5 
  Erasing        : xorg-x11-server-devel                    5/5 

Which is still not all the packages that were installed.

There should be a similar feature to `apt-get autoremove` that removes all unneeded packages with removed installation.

Comment 1 James Antill 2008-12-21 07:36:26 UTC
yum install yum-remove-with-leaves

...although I don't recommend it.

Comment 2 seth vidal 2008-12-21 15:06:55 UTC
To add to what James said:

remove-with-leaves works pretty well for most cases, there are occasions where it can have some surprising results depending on how deep you start to remove things.