forked from freebsd/pkg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpkg-install.8
236 lines (236 loc) · 6.56 KB
/
pkg-install.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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
.\"
.\" FreeBSD pkg - a next generation package for the installation and
.\" maintenance of non-core utilities.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\"
.\" @(#)pkg.8
.\"
.Dd October 30, 2014
.Dt PKG-INSTALL 8
.Os
.Sh NAME
.Nm "pkg install"
.Nd install packages from remote package repositories or local archives
.Sh SYNOPSIS
.Nm
.Op Fl AfIMnFqRUy
.Op Fl r Ar reponame
.Op Fl Cgix
.Ar <pkg-origin|pkg-name|pkg-name-version> ...
.Pp
.Nm
.Op Cm --{automatic,force,no-install-scripts,ignore-missing}
.Op Cm --{dry-run,fetch-only,quiet,from-root,no-repo-update,yes}
.Op Cm --repository Ar reponame
.Op Cm --{case-sensitive,glob,case-insensitive,regex}
.Ar <pkg-origin|pkg-name|pkg-name-version> ...
.Sh DESCRIPTION
.Nm
is used for installation of packages from package repositories or
local archives.
Multiple package names can be specified on the command line, either
explicitly or by matching against package names (or origins) in the repository
catalogues using shell globbing or regular expressions.
.Pp
.Nm
first updates any out of date repository catalogues, unless
.Cm REPO_AUTOUPDATE
has been set to
.Sy NO
in
.Pa pkg.conf .
.Pp
It then creates a work-list of all the package installations to do.
Any already installed and up-to-date packages will be dropped from the
list unless the
.Fl f
(force) option is supplied, in which case those packages will be
reinstalled.
.Pp
The dependencies of packages in the list are examined and any missing
packages are added to the list for installation.
Such implicitly added packages are flagged as candidates for
autoremoval.
See
.Xr pkg-autoremove 8
for details.
.Pp
Autoremoval flags are sticky, and will persist over reinstallation or
upgrade of the packages concerned, even if subsequently the packages
are named explicitly on a command line.
See
.Xr pkg-query 8
for finding the autoremoval status of a package, and
.Xr pkg-set 8
for modifying it.
.Pp
Any already installed but out of date packages, either named on the
command line or from the sum of all their dependencies are added to
the work list as upgrade jobs.
The work list is sorted into dependency order and
.Nm
will present it to the user for approval before proceeding, unless
overridden by the
.Fl y
option or the
.Cm ASSUME_ALWAYS_YES
setting in
.Pa pkg.conf .
.Pp
Packages are fetched from the repositories into the local package
cache if they are not already present, or if the checksum of the
cached package file differs from the one in the repository.
Packages may be downloaded from any of the repositories mentioned
in
.Xr pkg.conf 5
or in the files in
.Pa /usr/local/etc/pkg/repo .
See
.Xr pkg-repository 5
for details.
.Pp
Package repository catalogues will be automatically updated whenever
.Nm
is run by a user ID with write access to the package database,
unless disabled by the
.Fl U
flag or setting
.Cm REPO_AUTOUPDATE
to
.Sy NO
in
.Xr pkg.conf 5 .
.Sh OPTIONS
The following options are supported by
.Nm :
.Bl -tag -width automatic
.It Fl A , Cm --automatic
Mark the installed packages as automatic.
Will be automatically removed if no other packages depend on them.
For more information please refer to
.Xr pkg-autoremove 8 .
.It Fl C , Cm --case-sensitive
Make the standard or the regular expression
.Fl ( x )
matching against
.Ar pkg-name
case sensitive.
.It Fl f , Cm --force
Force the reinstallation of the package if already installed.
.It Fl g , Cm --glob
Treat the package names as shell glob patterns.
.It Fl I , Cm --no-install-scripts
If any installation scripts (pre-install or post-install) exist for a given
package, do not execute them.
When a package is updated, deinstallation
scripts (pre-deinstall or post-deinstall) are not run either.
.It Fl i , Cm --case-sensitive
Make the standard or the regular expression
.Fl ( x )
matching against
.Ar pkg-name
case insensitive.
This is the default, unless modified by setting
.Ev CASE_SENSITIVE_MATCH
to true in
.Pa pkg.conf .
.It Fl M , Cm --ignore-missing
Force the installation of the package with missing dependencies.
.It Fl n , Cm --dry-run
Dry-run mode.
The list of changes to packages is always printed, but
no changes are actually made.
.It Fl F , Cm --fetch-only
Do not perform actual installation of packages, merely fetch packages
that should be upgraded and detect possible conflicts.
.It Fl q , Cm --quiet
Force quiet output, except when
.Fl n
is used, where
.Nm
will always show packages to be installed, upgraded or deleted.
.It Fl R , Cm --from-root
When used with
.Fl f ,
reinstalls any packages that require the given package.
.It Fl r Ar reponame , Cm --repository Ar reponame
Install packages from only the named repository,
irrespective of the configured
.Dq active
status from
.Pa repo.conf .
.It Fl U , Cm --no-repo-update
Suppress the automatic update of the local copy of the repository catalogue
from remote.
Automatic repository catalogue updates are only attempted when the
effective UID of the process has write access to the package database.
Otherwise they are silently ignored.
.It Fl x , Cm --regex
Treat the package names as regular expressions according to the
"modern" or "extended" syntax of
.Xr re_format 7 .
.It Fl y , Cm --yes
Assume yes when asked for confirmation before package installation.
.El
.Sh ENVIRONMENT
The following environment variables affect the execution of
.Nm .
See
.Xr pkg.conf 5
for further description.
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
.It Ev DEFAULT_ALWAYS_YES
.It Ev ASSUME_ALWAYS_YES
.It Ev CASE_SENSITIVE_MATCH
.It Ev HANDLE_RC_SCRIPTS
.It Ev PKG_CACHEDIR
.It Ev PKG_DBDIR
.It Ev REPO_AUTOUPDATE
.El
.Sh FILES
See
.Xr pkg.conf 5 .
.Sh SEE ALSO
.Xr pkg_printf 3 ,
.Xr pkg_repos 3 ,
.Xr pkg-repository 5 ,
.Xr pkg.conf 5 ,
.Xr pkg 8 ,
.Xr pkg-add 8 ,
.Xr pkg-annotate 8 ,
.Xr pkg-audit 8 ,
.Xr pkg-autoremove 8 ,
.Xr pkg-backup 8 ,
.Xr pkg-check 8 ,
.Xr pkg-clean 8 ,
.Xr pkg-config 8 ,
.Xr pkg-convert 8 ,
.Xr pkg-create 8 ,
.Xr pkg-delete 8 ,
.Xr pkg-fetch 8 ,
.Xr pkg-info 8 ,
.Xr pkg-lock 8 ,
.Xr pkg-query 8 ,
.Xr pkg-register 8 ,
.Xr pkg-repo 8 ,
.Xr pkg-rquery 8 ,
.Xr pkg-search 8 ,
.Xr pkg-set 8 ,
.Xr pkg-shell 8 ,
.Xr pkg-shlib 8 ,
.Xr pkg-ssh 8 ,
.Xr pkg-stats 8 ,
.Xr pkg-update 8 ,
.Xr pkg-updating 8 ,
.Xr pkg-upgrade 8 ,
.Xr pkg-version 8 ,
.Xr pkg-which 8