On Thu, 22 Oct 2009 14:09:31 +0200, Alan McKinnon
<alan.mckin...@gmail.com>
wrote:
> On Thursday 22 October 2009 15:42:41 Johannes Kimmel wrote:
>> Helmut Jarausch wrote:
>> > Hi,
>> >
>> > is there an easy way to unmerge all packages which are no longer in
>> > the current portage tree.
>> > (Those make problems on update world)
>> >
>> > Many thanks for a hint,
>> > Helmut.
>> 
>> if packages are not in the portage tree, they should not be pulled in
>> anymore. therefore "emerge --depclean" could help.
> 
> depclean only removes packages that it knows for a fact are no longer
> needed. 
> This means
> 
> - not in world
> - not linked to by anything
> - not depended on by anything
> 
> "not in the tree" is not part of that list. If you have a package in
world 
> that is not in the tree anymore, depclean will leave it as is. It will
> remove 
> ancient mere deps that are somehow still lying around though

Yep, if the package is in world, delclean will not help.

You could always do it the bash way. I have no idea if there's any tool
out there that will make this easier, but it's simple enough to script it,
something like this should work:

qlist -I --nocolor | while read pkg; do
  if [ ! -d "/var/portage/$pkg" ]; then
    echo "$pkg is not in portage"
  fi
done

This will not catch overlays, but it could be easily extended to do so,
it's just a generic (and untested) example. It should work I guess. It just
dumps the list of installed packages, then tries to find a dir with the
same name under your portage directory and if it doesn't exist then the
package name is printed.

-- 
Jesús Guerrero

Reply via email to