Date: Fri, 30 Jun 2006 00:28:13 -0700 From: Maxim Sobolev <sobomax@FreeBSD.org> To: MonkeyBrains <crapsh@MonkeyBrains.NET> Cc: freebsd-current@FreeBSD.org Subject: Re: one liner to clean up your /usr/ports/distfiles Message-ID: <44A4D28D.6090305@FreeBSD.org> In-Reply-To: <44A4CBE1.9060205@MonkeyBrains.NET> References: <44A4CBE1.9060205@MonkeyBrains.NET>
next in thread | previous in thread | raw e-mail | index | archive | help
That's why we have ports/Tools/scripts/distclean.sh for 5 years now.
-Maxim
MonkeyBrains wrote:
>
> Ever notice your /usr/ports/distfiles bloats after several years of
> updating the same box?
> You know those 5 year old drives are about to fail, but, if you want to
> clean them up a bit, I like this:
>
> cd /usr/ports/distfiles
> perl -e 'while (<*>) { chomp(); $p = $_; $p =~ s/\-\d+\..*// or next;
> unlink $X if $X =~ /^$p/; $X = $_;}'
>
> Removes the lower version number of 'double' source files, like these:
> -rw-r--r-- 1 root wheel 1282627 Sep 12 2005 tiff-3.7.4.tar.gz
> -rw-r--r-- 1 root wheel 1336295 Mar 23 07:15 tiff-3.8.2.tar.gz
>
> Rudy
> _______________________________________________
> freebsd-current@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
>
>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44A4D28D.6090305>
