xref: /openbsd-src/share/man/man1/clean-old-distfiles.1 (revision 99fd087599a8791921855f21bd7e36130f39aadc)
1.\"	$OpenBSD: clean-old-distfiles.1,v 1.1 2018/06/26 05:38:49 espie Exp $
2.\"
3.\" Copyright (c) 2012 Marc Espie <espie@openbsd.org>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd $Mdocdate: June 26 2018 $
18.Dt CLEAN-OLD-DISTFILES 1
19.Os
20.Sh NAME
21.Nm clean-old-distfiles
22.Nd remove old distfiles
23.Sh SYNOPSIS
24.Nm clean-old-distfiles
25.Op Fl nv
26.Op Fl e Ar except
27.Op Fl h Ar history
28.Op Ar timestamp
29.Sh DESCRIPTION
30.Nm
31uses information provided by
32.Xr dpb 1
33to remove obsolete distfiles:
34each time
35.Xr dpb 1
36is run for a full scan of the ports tree, it appends to
37an history log that records obsolete distfiles.
38.Pp
39.Nm
40can be used to prune that log prior to a given
41.Ar timestamp
42and remove the corresponding distfiles.
43.Pp
44For normal files,
45.Nm
46verifies
47.Xr sha256 1
48checksums prior to removal.
49.Nm
50also removes links under
51.Pa by_cipher/sha256 ,
52but it trusts that the checksums for these are accurate.
53.Pp
54The
55.Ar timestamp
56optional argument is given in seconds since the epoch,
57see
58.Xr date 1 .
59.Pp
60Options are as follows:
61.Bl -tag -width nnnn
62.It Fl e Ar except
63Read exception list from file
64.Ar except .
65Each line is the name of a file that shouldn't be removed.
66.It Fl h Ar history
67Read log from history file
68.Ar history
69instead of the default
70.Pa /usr/ports/distfiles/history .
71Turns on
72.Fl nv ,
73as this is a testing option.
74.It Fl n
75Don't really remove files.
76.It Fl v
77Display what will be removed, as
78.Li rm file
79lines.
80.El
81.Sh FILES
82.Bl -tag -width /usr/ports
83.It Pa /usr/ports
84base of the ports tree, can be overridden with env variable
85.Ev PORTSDIR .
86.It Pa /usr/ports/distfiles
87location of the distfiles repository, can be overridden with env variable
88.Ev DISTDIR .
89.It Pa /usr/ports/distfiles/history
90log of obsolete distfiles.
91.El
92.Sh SEE ALSO
93.Xr dpb 1 ,
94.Xr sha256 1 ,
95.Xr mirroring-ports 7
96