2 .\" FreeBSD install - a package for the installation and maintenance
3 .\" of non-core utilities.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
25 .Nd a utility for displaying information on software packages
28 .Op Fl bcdDEfghGiIjkKLmopPqQrRsvVxX
32 .Fl a | Ar pkg-name ...
43 command is used to dump out information for packages, either packed up in
46 command or already installed on the system
51 The following command line options are supported:
52 .Bl -tag -width indent
54 The named packages are described.
55 A package name may either be the name of
56 an installed package, the pathname to a package distribution file or a
57 URL to an FTP available package.
58 Package version numbers can also be matched in a relational manner using the
65 .Dl "pkg_info 'portupgrade>=20030723'"
67 will match versions 20030723 and later of the
71 Show all currently installed packages.
75 environment variable for output even when the
83 Turn on verbose output.
85 Show the installation prefix for each package.
89 in emitting report headers and such, just dump the
90 raw info (basically, assume a non-human reading).
94 as above but print preface output with the package name.
96 Show the (one line) comment field for each package.
98 Show the long description field for each package.
100 Show the install-message file for each package.
102 Show the packing list instructions for each package.
104 Show files that do not match the recorded checksum.
106 Show the install script (if any) for each package.
108 Show an index line for each package.
110 precedence over all other package formatting options.
112 Show the requirements script (if any) for each package.
114 Show the de-install script (if any) for each package.
116 Keep any downloaded package in
118 if it is defined or in current directory by default.
120 For each of the specified packages,
121 show the list of packages on which it depends.
123 For each of the specified packages,
124 show the list of installed packages which require it.
128 file (if any) for each package.
130 Show the files within each package.
131 This is different from just
132 viewing the packing list, since full pathnames for everything
135 Show the total size occupied by files installed within each package.
139 path recorded on package generation.
140 This path is the directory name in the
142 .Em "Ports Collection"
143 of the underlying port from which the package was generated.
145 Do not try to expand shell glob patterns in the
147 when selecting packages to be displayed (by default
149 automatically expands shell glob patterns in the
151 .It Fl W , -which Ar filename
154 argument show which package it belongs to.
155 If the file is not in the
156 current directory, and does not have an absolute path, then the
157 directories specified in the environment variable
161 .It Fl O , -origin Ar origin
162 List all packages having the specified
167 as a regular expression and display information only for packages
168 whose names match that regular expression.
170 expressions could be provided, in that case
172 displays information about all packages that match at least one
173 regular expression from the list.
179 as an extended regular expression.
180 .It Fl e , -exists Ar package
181 If the package identified by
183 is currently installed, return 0, otherwise return 1.
185 allows you to easily test for the presence of another (perhaps
186 prerequisite) package from a script.
188 Show only matching package names.
190 precedence over all other package formatting options.
191 If any packages match, return 0, otherwise return 1.
193 Prefix each information category header (see
197 This is primarily of use to front-end programs that want to request a
198 lot of different information fields at once for a package, but do not
199 necessarily want the output intermingled in such a way that they cannot
201 This lets you add a special token to the start of
203 .It Fl t , -template Ar template
210 By default, this is the string
211 .Pa /tmp/instmp.XXXXXX ,
212 but it may be necessary to override it in the situation where
215 directory is limited.
216 Be sure to leave some number of
220 to fill in with a unique ID.
221 .Bd -ragged -offset indent -compact
222 Note: This should really not be necessary with
224 since very little information is extracted from each package
225 and one would have to have a very small
227 indeed to overflow it.
230 Show revision number of the packing list format.
232 Show revision number of package tools.
234 .Sh TECHNICAL DETAILS
235 Package info is either extracted from package files named on the
236 command line, or from already installed package information
238 .Pa /var/db/pkg/ Ns Aq Ar pkg-name .
240 .Bl -tag -width ".Ev PKG_TMPDIR"
242 If the environment variable
244 is set the block counts will be displayed in units of that
247 Points to the directory where
249 creates its temporary files.
250 If this variable is not set,
253 If both are unset, the builtin defaults are used.
255 Specifies an alternative location for the installed package database.
257 Specifies an alternative package location, if a given package cannot be
260 Specifies an alternative location to save downloaded packages to.
263 .Bl -tag -width ".Pa /var/db/pkg" -compact
265 Used if the environment variables
269 are not set, or if the directories named have insufficient space.
273 does not exist or has insufficient space.
279 Default location of the installed package database.
291 .An John Kohl Aq jtk@rational.com ,
292 .An Oliver Eikemeier Aq eik@FreeBSD.org