The dep-clean tool from the gentoolkit package does not work if too many packages are installed. It seems that fgrep give an error message like "argument list too long".
Created attachment 5915 [details, diff] patch for dep-clean found in gentoolkit-0.1.17-r4 grep complains of a too long argument list, but we can feed the patterns into grep through a file instead of through the command line with the -f parameter. For example, this is one of the conflicting parts: qpkg -I -nc -vv | \ grep ebuild | \ fgrep "`cat ${tmp}/world`" | \ cut -f5,6 -d"/" > ${tmp}/world.all This could be changed to: qpkg -I -nc -vv | \ grep ebuild | \ fgrep -f ${tmp}/world | \ cut -f5,6 -d"/" > ${tmp}/world.all Theres about 3 fgreps that do the same sort of thing. Changing each one to use the -f parameter solves the problem.
I've just noticed emerge -p depclean does the same thing and faster! I guess dep-clean is obsolete now.
I want it to be :) It'll probably be removed with the next release of Gentoolkit.
dep-clean is getting deprecated; wishes for the replacement tools (not named yet) will be solicited shortly.