summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/pkg_fsck.8
blob: 4c133427e63b1ee4b5a788f39a63b3641887d3f9 (plain)
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
.\"	$OpenBSD: pkg_fsck.8,v 1.2 2010/06/05 17:03:27 jmc Exp $
.\"
.\" Copyright (c) 2010 Marc Espie <espie@openbsd.org>
.\"
.\" 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 $Mdocdate: June 5 2010 $
.Dt PKG_FSCK 1
.Os
.Sh NAME
.Nm pkg_fsck
.Nd check consistency of installed packages
.Sh SYNOPSIS
.Nm pkg_fsck
.Bk -words
.Op Fl fimnqvx
.Oo Fl D Ar name
.Ns Oo Ns = Ns Ar value
.Oc
.Oc
.Ek
.Sh DESCRIPTION
.Nm
verifies as much information as it can about installed packages.
.Pp
.Nm
is not needed under normal circumstances, but it can be used to recover after
a catastrophic system failure in the middle of a
.Xr pkg_add 1
or
.Xr pkg_delete 1 .
.Pp
.Nm
performs the following checks:
.Bl -tag -width small
.It Packing-list sanity
Checks that
.Pa /var/db/pkg
only contains directories, that each directory holds a packing-list,
and that said packing-list is an actual packing-list that matches the directory.
.It Files from packages
Checks that each file or directory in those packing-lists actually exist,
and that their checksum matches what's recorded in the packing-list.
.El
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Xo
.Fl D
.Ar name Ns Op = Ns Ar value
.Xc
For consistency with other pkg commands.
No relevant defines so far.
.It Fl f
Force the removal of bogus package information.
.It Fl i
Ask user whether to irrevocably remove bogus package information.
.It Fl m
Causes
.Nm
to always display the progress meter in cases it would not do so by default.
.It Fl n
Don't actually modify packages, just perform checks.
.It Fl q
Don't verify checksums for files, just check for their existence.
.It Fl v
Turn on verbose output.
Several
.Fl v
may turn on more verbose output.
.It Fl x
Disable progress meter.
.El
.Sh SEE ALSO
.Xr fsck 8
.Sh AUTHORS
This program was written by
.An Marc Espie .
.Sh BUGS
Work in progress.
More checks to be added.
Use with caution.