The following lines creates an auditWorldFile.log log file which will show packages requires by other packages, so theones you can safely remove.
#!/bin/bash n=`wc -l /var/lib/portage/world|awk '{ print $1 }'`; for i in `seq 1 $n`;do pkg=`cat /var/lib/portage/world|head -n$i|tail -n1`; echo -e "Packages depending on $pkg." >> /tmp/auditWorldFile.log equery d $pkg >> /tmp/auditWorldFile.log echo -e "" >> /tmp/auditWorldFile.log done; 2010/12/8 Johannes Kimmel <johannes.kim...@gmx.de>: > On 12/08/2010 12:23 PM, Helmut Jarausch wrote: >> >> 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. >> >> Many thanks for a hint, >> Helmut. >> >> > > Hi, > > I wanted to add, that a minimal world in my opinion isn't always what you > want. For example in the time I searched for a suitable window manager for > me I did a lot of depclean these days and accidently removed the xserver. > There was no harm done, but I figured, that my world file should contain all > packages, that should never removed automatically unless I want to. This way > there is a little less danger involved using depclean. So this type of work > might only be done by hand. > > Johannes Kimmel > >