A lot of distfiles accumulates in distfiles directory over time and it would be nice that there be some way to know which files are "in use" (there are installed packages that used this file during build process), when they were used last time and what is the probability of using it again (will this file be used again if any package that uses it now is upgraded). Although probabilities and other heuristics may be hard to implement (and it may be that they will not be used or particularly interesting) but it should be trivial to make portage update some database or text file(s) every time a package is emerged or unmerged. It is crucial that this file/DB be located directly in the portage tree as it may be shared by more than one machine. E.g. there could be a file <filename>.usage in distfiles/ or <filename>.txt in distfiles/usage/ (less comfortable) for each distfile that contained three lines: the download date, the date of last use ("emerge'nce") and use count during that period. These lines might not be human-understandable as long as there were an utility to query the usage in an acceptable way. Reproducible: Always Steps to Reproduce:
Distfiles cleaning tools exist... I wrote one a while ago, but it needs editing and I think they are named backwards. http://gentoo.twobit.net/scripts/
*** This bug has been marked as a duplicate of 33877 ***