CLEAN-OLD-DISTFILES(1)

NAME
clean-old-distfiles - remove old distfiles

SYNOPSIS
clean-old-distfiles [-nv] [-e except] [-h history] [timestamp]

DESCRIPTION
clean-old-distfiles uses information provided by dpb(1) to remove obsolete distfiles: each time dpb(1) is run for a full scan of the ports tree, it appends to an history log that records obsolete distfiles.

clean-old-distfiles can be used to prune that log prior to a given timestamp and remove the corresponding distfiles.

For normal files, clean-old-distfiles verifies sha256(1) checksums prior to removal. clean-old-distfiles also removes links under by_cipher/sha256, but it trusts that the checksums for these are accurate.

The timestamp optional argument is given in seconds since the epoch, see date(1).

Options are as follows:

-e except
    Read exception list from file except. Each line is the name of a file that shouldn't be removed.

-h history
    Read log from history file history instead of the default /usr/ports/distfiles/history. Turns on -nv, as this is a testing option.

-n  Don't really remove files.

-v  Display what will be removed, as rm file lines.

FILES

/usr/ports
    base of the ports tree, can be overridden with env variable PORTSDIR.

/usr/ports/distfiles
    location of the distfiles repository, can be overridden with env variable DISTDIR.

/usr/ports/distfiles/history
    log of obsolete distfiles.

SEE ALSO
dpb(1), sha256(1), mirroring-ports(7)