Locating obsolete ports distfiles

Mike Meyer mwm-keyword-hackers.e471b2 at mired.org
Mon Aug 22 04:43:15 GMT 2005


In <20050822043647.GB37107 at cirb503493.alcatel.com.au>, Peter Jeremy <PeterJeremy at optushome.com.au> typed:
> I currently have just over 8GB is /usr/ports/distfiles.  Some of these
> files are more than 10 years old and long obsolete.  Does anyone have
> any suggestions on how to identify which files are no longer referenced
> by current ports?
> 
> Doing a 'make checksum' on every installed port and then looking at
> the atimes is one approach but this doesn't handle:
> - ports that I don't currently have installed but might need
> - ports installed on systems that mount /usr/ports readonly

Install sysutils/portupgrade, and do a "portsclean -D". That will
remove all the distfiles that aren't referenced by any port in the
tree. Do "portsclean -DD" and it'll remove all distfiles not used by
an installed port.

	<mike
-- 
Mike Meyer <mwm at mired.org>		http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.


More information about the freebsd-hackers mailing list