Portage should have an option to search all ebuilds which do not explicitely depend on other ebuilds. This would give a list of applications and libraries. The user might then unmerge himself the unused libraries or applications he does not want anymore. This would perhaps be better than depclean, since only unused programs are detected and the user is left with what he wants to unmerge. Reproducible: Always Steps to Reproduce: 1. 2. 3.
Can you give a real world example? I have major problems understanding what you're after.
Ok. When updating a system, many applications need new librarys. And many do not need the old librarys anymore. I do not mean version numbers but say, an Application-version1 needs libone-version1 and Application-version2 needs only libdifferent-version 1. The old libone-version1 will not be unmerged by an emerge -uD world. This means that during the years, one has a growing and growing disk with unneeded librarys. the output of emerge --depclean does very much depend on the world file. I don't think that this is a good solution since a user might have emerged libone directly. I think the only solution to this dilemma is the following: a command emerge --searchalldeps which prints out all packages, which no other package needs to work. Of course it will print out all programs like nano or koffice or what so ever. But it will also print old programs which the user has simply forgotten and, more important: it will give out those librarys which no one needs and can be deleted an example: emerge --searchalldeps output: App_office koffice nano emacs Sys-libs un-needed-library1 un-needed-library2 old-library3 and so on. Since it is detected that no ebuild depends on un-needed-library1, un-needed- library2, old-library3, the user might consider to unmerge these old ebuilds and has no risk to damage his system.
Portage doesn't have the dependency information to do what you are after. Many dependencies are implied in the current setup. We would need developers to specify much more detailed DEPEND, RDEPEND, and BDEPEND ( IIRC ) atoms in the ebuilds in order for this to be done. Since BDEPEND support isn't planned for stable this feature probably won't be in for a while. I believe the developers are planning on the next revision of portage having much better dependency tracking where old unused libs are in fact removed when they are no longer needed.
Portage might not have this information. It would indeed require much storage. But might it able to write code for gathering it? One needs simply a list with all ebuilds installed in world and notice the depencies in a list. When in the depency list an ebuild in the ebuild list is found, mark the item in the ebuild list and also in the depency list. Then, at the end one has some ebuild items that are not marked, and these are those which no other ebuilds depend on. Additionally one would have these ebuilds marked which some other ebuilds depend on and are missing. This should not be too difficult to implement.
Basically asking for a similar thing, a list of packages/libs that are no longer depended on. *** This bug has been marked as a duplicate of 2938 ***