-
Notifications
You must be signed in to change notification settings - Fork 9
/
sysclean.8
127 lines (127 loc) · 3.21 KB
/
sysclean.8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
.\" $OpenBSD$
.\"
.\" Copyright (c) 2016-2017 Sebastien Marie <semarie@online.fr>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd June 18, 2017
.Dt SYSCLEAN 8
.Os
.Sh NAME
.Nm sysclean
.Nd list obsolete files between OpenBSD upgrades
.Sh SYNOPSIS
.Nm
.Op Fl a | p
.Op Fl i
.Sh DESCRIPTION
.Nm
is a
.Xr perl 1
script designed to help remove obsolete files between
.Ox
upgrades.
.Pp
.Nm
compares a reference root directory against the currently installed files,
taking files from both the base system and packages into account.
.Pp
.Nm
does not remove any files on the system.
It only reports obsolete filenames or packages using out-of-date libraries.
.Pp
By default,
.Nm
lists obsolete filenames on the system.
It excludes any used dynamic libraries.
It will report base libraries with versions newer than what's expected.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl a
All files mode.
.Nm
will not exclude filenames used by installed packages from output.
.It Fl p
Package mode.
.Nm
will output package names that are using obsolete files.
.It Fl i
With ignored.
.Nm
will include filenames that are ignored by default, using
.Pa /etc/sysclean.ignore .
.El
.Sh ENVIRONMENT
.Bl -tag -width "PKG_DBDIR"
.It Ev PKG_DBDIR
The standard package database directory,
.Pa /var/db/pkg ,
can be overridden by specifying an alternative directory in the
.Ev PKG_DBDIR
environment variable.
.El
.Sh FILES
.Bl -tag -width "/etc/sysclean.ignore"
.It Pa /etc/sysclean.ignore
Files to ignore, one per line, with absolute pathnames.
Shell globbing is supported in pathnames; see
.Xr File::Glob 3p .
If the pattern matches a directory,
.Nm
will not inspect it or any files contained within.
For compatibility with the
.Xr changelist 5
file format, the character
.Sq +
is skipped at the beginning of a line.
.Pp
.Pa /etc/changelist
is implictly included.
.El
.Sh EXAMPLES
Obtain a list of outdated files (without libraries used by packages):
.Bd -literal -offset indent
# sysclean
/usr/lib/libc.so.83.0
.Ed
.Pp
Obtain a list of old libraries and the package using them:
.Bd -literal -offset indent
# sysclean -p
/usr/lib/libc.so.84.1 git-2.7.0
/usr/lib/libc.so.84.1 gmake-4.1p0
.Ed
.Pp
Obtain a list of all outdated files (including used libraries):
.Bd -literal -offset indent
# sysclean -a
/usr/lib/libc.so.83.0
/usr/lib/libc.so.84.1
.Ed
.Sh SEE ALSO
.Xr pkg_info 1 ,
.Xr sysmerge 8
.Sh HISTORY
The first version of
.Nm
was written as
.Xr ksh 1
script in 2015, and rewritten using
.Xr perl 1
in 2016.
.Sh AUTHORS
.An -nosplit
.Nm
was written by
.An Sebastien Marie Aq Mt semarie@online.fr .