On Friday 13 April 2007 01:59:47 Neil Bothwick wrote:
> > Provided you have gentoolkit something as simple as this works:
> >
> > # emerge -Cva $(equery -q list gentoo-sources | head -n -2)
>
> That only cleans out /usr/src, it's slightly different to what I use
> (which rm's the directories first to speed things up) but does basically
> the same. You also need to clear out /lib/modules and /boot with

True.

> Here's the script I use, which is guaranteed to work when it doesn't
> fail. When it does break, you can keep the pieces.
[SNIP]
> equery --quiet --nocolor list --duplicates gentoo-sources | awk '{print $1}' 
> | head -n -2 | xargs --no-run-if-empty emerge --unmerge &>/dev/null

Out of interest:

1) Why --duplicates (i.e. am I missing something ;).
2) Why the awk? Is there ever more than one column without --no-pipe ?
-- 
Bo Andresen

Attachment: pgpvOj4aemQ3p.pgp
Description: PGP signature

Reply via email to