Bug 189661

Summary: "yum remove <pkg>" doesn't remove dependencies
Product: [Fedora] Fedora Reporter: James Hunt <jamesodhunt>
Component: yumAssignee: Jeremy Katz <katzj>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5CC: katzj
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-04-24 17:20:22 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 James Hunt 2006-04-22 08:32:19 UTC
Description of problem:

Running "yum remove <pkg>" doesn't clean up the dependencies for <pkg>.

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

yum-2.6.0-1

How reproducible:

Always.

Steps to Reproduce:
1. Ensure xemacs not installed.
2. yum -y install xemacs
This installs the following packages, due to xemacs dependencies:

Canna-libs
FreeWnn-libs
neXtaw
xemacs
xemacs-common
xemacs-sumo

3. yum remove xemacs
  
Actual results:

The xemacs package is removed. However, the following packages are not removed,
even though clearly they are not required by any other package on the system:

Canna-libs
FreeWnn-libs
neXtaw
xemacs-common
xemacs-sumo

Expected results:

I would have expected all the packages that xemacs depends on, and which are not
required by other packages, to be removed.

Additional info:

Comment 1 Jeremy Katz 2006-04-24 17:20:22 UTC
yum remove <pkg> does remove all things that depend on package, but not vice
versa as there's no real way to know that nothing else on the system (including
things built or installed by hand) don't depend on them.

If you install the yum-utils package, there is a utility called package-cleanup
which can help you to find leaf node packages and remove them.