Helmut Jarausch <[email protected]>: > Hi, > > does anybody know about an easy method to remove all entries from > /var/lib/portage/world > which would have been pulled in anyway > even if they were not contained in world. > > My current attempt would be to write a script > which executes emerge -vpc on each entry in world. > If it wouldn't be removed it's obsolete in world. > > Unfortunately this has to be done in several rounds.
As far as I know there is currently no tool available for something like this. I have a skript which runs emerge -pv --depclean for every entry in world. If depclean returns reverse dependencies the package in question is redundant in world. It takes quite some time but works reliable. There are false positives for packages with PDEPENDS, but you will recognize this when "emerge -pv --depclean" wants to remove packages which you want to keep afterwards and you can add them back manually. Another method would be removing the world file (backup before) and run the regenworld script afterwards. The result is not really minimal so there will still be redundant entries. I asked the portage maintainer about such a tool, as it would be best if it uses the portage API to speed things up. He didn't not see the point of such a script but thought about writing something which creates a minimal word file. If you want such a functionality I recommend to open a bug about it. -- Daniel Pielmeier

