summaryrefslogtreecommitdiff
path: root/man/man8/infopkg.8
blob: 5da11c82ca705d4e429a9e845d7f8133400a5960 (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
93
94
95
96
97
.Dd September 27, 2026
.Dt INFOPKG 8
.Os
.Sh NAME
.Nm infopkg
.Nd query the package database
.Sh SYNOPSIS
.Nm
.Op Fl r Ar root
.Fl i
.Nm
.Op Fl r Ar root
.Fl l Ar package | file
.Nm
.Op Fl r Ar root
.Fl o Ar regex
.Nm
.Fl f Ar file
.Nm
.Fl h | v
.Sh DESCRIPTION
.Nm
reads the package database, or a package archive, and prints what it
finds.
Exactly one of
.Fl f ,
.Fl i ,
.Fl l
and
.Fl o
must be given.
.Pp
The options are as follows:
.Bl -tag -width Ds
.It Fl f Ar file
Print the footprint of the package archive
.Ar file .
The database is not used.
.It Fl h
Print a usage summary.
.It Fl i
List the installed packages with their versions, sorted by name.
.It Fl l Ar package | file
List the files of the installed package
.Ar package .
If no such package is installed, list the files in the package archive
.Ar file .
.It Fl o Ar regex
List the installed files matching the extended regular expression
.Ar regex ,
with the package that owns each.
Paths are matched with a leading
.Ql / .
If nothing matches,
.Dq no owner found
is printed.
.It Fl r Ar root
Use the database under
.Ar root
instead of
.Pa / .
.It Fl v
Print the version.
.El
.Sh ENVIRONMENT
.Bl -tag -width PKG_DBDIR
.It Ev PKG_ROOT
Root if
.Fl r
is not given.
.It Ev PKG_DBDIR
Package database directory; see
.Xr addpkg 8 .
.El
.Sh FILES
.Bl -tag -width Ds -compact
.It Pa /var/lib/pkg/db
Package database.
.El
.Sh EXIT STATUS
.Ex -std
Finding no owner with
.Fl o
is not an error.
.Sh EXAMPLES
Which package owns
.Pa /bin/ls ?
.Pp
.Dl $ infopkg -o '^/bin/ls$'
.Pp
List the files in a package archive:
.Pp
.Dl $ infopkg -l 'nftables#1.1.5-1.pkg.tar.gz'
.Sh SEE ALSO
.Xr addpkg 8 ,
.Xr delpkg 8 ,
.Xr pkg 8