Try to delete files

Matthew Seaman m.seaman at
Thu Jul 10 05:01:35 PDT 2003

On Thu, Jul 10, 2003 at 07:21:42PM +0800, Nigel Taylor wrote:
> Hi all,
> Hi, in my years of using freebsd i have collected alot of distfiles in 
> the ports tree and i want to free up some space on my harddrive and i 
> was wondering is there a command to delete files in the distfiles folder 
> that are less than the year 2000?
> Or maybe there is a program that deletes all the older releases in the 
> distfiles? if someone could help i would be gratefully

    portsclean -D

will delete all distfiles that aren't referenced by any of the ports
currently under /usr/ports.

    portsclean -DD

will delete all distfiles which aren't referenced by any currently
installed port or package.

portsclean(1) is part of the portupgrade suite of tools.

Otherwise, you can find all of the files older than a certain date by:

    # cd /usr/ports/distfiles
    # touch -t 200001010000 datestamp
    # find . \! -newer datestamp -type f -print 



Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP:         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the freebsd-questions mailing list