Bug 329018

Summary: software manager: provide aid in removing unused libraries (uninstall)
Product: [openSUSE] openSUSE 10.2 Reporter: macias - <bluedzins>
Component: libzyppAssignee: Michael Schröder <mls>
Status: RESOLVED FEATURE QA Contact: Klaus Kämpf <kkaempf>
Severity: Enhancement    
Priority: P3 - Medium CC: dmacvicar, helios_reds, ma, mls, schubi
Version: Final   
Target Milestone: ---   
Hardware: i586   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description macias - 2007-09-27 16:05:17 UTC
This is typical situation, I install app A but it requires library L. I install both, then it appears I don't need A anymore, so I remove it, but I have no clue what to remove too.

From user point of view, it would be great to click on "check for unused software" and SM would show list of unused libraries, so user could easily remove them.

Technically I can imagine it could be done by building reverse dependency tree and show all leaves. The drawback of such approach would be in including main apps too :-) Maybe it could be solved by checking if:
1) there is an executable in the package
2) any of the files in the package were accessed lately
3) did user install it explictly or it was SM call (fullfilling requirements)
Comment 1 Klaus Kämpf 2007-09-29 13:11:28 UTC
This functionality is rather 'tricky' to get right since Linux doesn't track usage of files.
I'd encourage you to bring up you proposal on either the opensuse-factory or opensuse-softwaremgmt mailing list, so we can drive this to a broadly accepted consensus.
Comment 2 Klaus Kämpf 2007-10-05 09:10:38 UTC
Revisit in preparation of Code11
Comment 3 Klaus Kämpf 2007-10-23 10:03:59 UTC
Michael, jfyi.
The topic is dicussed on opensuse-softwaremgmt
Comment 4 macias - 2008-01-23 19:43:22 UTC
Klaus, recently I spotted a discussion on Polish suse forum and I was a inspired by it and by need of having such tool.

So I made pretty small program that looks for orphaned packages and what's more check the access time for every file in the package. The process is lengthy but the results are quite accurate. What's more it is possibility of blocking well-known packages (rpm, yast -- those shouldn't be uninstalled).

Of course this works as good as:
a) packages are well prepared -- I already spot that vim&relatives are based on yast patterns, not on rpm dependencies
b) user didn't turn access time info off

Just for the record anyone interested can give it a try and test describe algorithm:
http://margot.cad.pl/lumberjack.php
it does not remove anything, it just shows the list with suggestion.

Comment 5 Satoru Matsumoto 2010-11-27 15:13:24 UTC
10.2 is obsolete now and this might be a kind of feature request and duplicate of "#305305: 1-click uninstall" - https://features.opensuse.org/305305 . I'll close this as FEATURE. Thanks! 

(changed during the 2010-11-27 bug day about bugs for obsolete versions of openSUSE)