PKG(1) | User Commands | PKG(1) |
pkg
— Image
Packaging System client
pkg |
[options] command [cmd_options] [operands] |
pkg |
refresh [-q ]
[--full ] [publisher
...] |
pkg |
install [-nvq ]
[-C n]
[-g path_or_uri]...
[ -r
[[-z zonename]... | [-Z zonename]...]]
[ --accept ] [--licenses ]
[--no-index ]
[--no-refresh ]
[ --no-be-activate
| --temp-be-activate ]
[--no-backup-be | --require-backup-be ]
[--backup-be-name name]
[--deny-new-be | --require-new-be ]
[--be-name name]
[ --reject pkg_fmri_pattern]...
[--sync-actuators | --sync-actuators-timeout timeout]
pkg_fmri_pattern ... |
pkg |
exact-install [-nvq ]
[-C n]
[-g path_or_uri]...
[ --accept ] [--licenses ]
[--no-index ]
[--no-refresh ]
[ --no-be-activate
| --temp-be-activate ]
[--no-backup-be | --require-backup-be ]
[--backup-be-name name]
[--deny-new-be | --require-new-be ]
[--be-name name]
[ --reject pkg_fmri_pattern]...
pkg_fmri_pattern ... |
pkg |
uninstall [-nvq ]
[-C n]
[ -r
[[-z zonename]... | [-Z zonename]...]]
[ --ignore-missing ]
[--no-index ]
[ --no-be-activate
| --temp-be-activate ]
[--no-backup-be | --require-backup-be ]
[--backup-be-name name]
[--deny-new-be | --require-new-be ]
[--be-name name]
[ --sync-actuators
| --sync-actuators-timeout timeout]
pkg_fmri_pattern ... |
pkg |
update [-fnvq ]
[-C n]
[-g path_or_uri]...
[ -R | -r
[[-z zonename]... | [-Z zonename]...]]
[ --accept ]
[--ignore-missing ]
[--licenses ] [--no-index ]
[--no-refresh ]
[ --no-be-activate
| --temp-be-activate ]
[--no-backup-be | --require-backup-be ]
[--backup-be-name name]
[--deny-new-be | --require-new-be ]
[--be-name name]
[ --reject pkg_fmri_pattern]...
[ --sync-actuators
| --sync-actuators-timeout timeout]
[pkg_fmri_pattern ...] |
pkg |
apply-hot-fix [-nvq ]
[-C n]
[-g path_or_uri]...
[ -R | -r
[[-z zonename]... | [-Z zonename]...]]
[ --accept ]
[--ignore-missing ]
[--licenses ] [--no-index ]
[--no-refresh ]
[ --no-be-activate
| --temp-be-activate ]
[--no-backup-be | --require-backup-be ]
[--backup-be-name name]
[--deny-new-be | --require-new-be ]
[--be-name name]
path_or_uri [pkg_fmri_pattern ...] |
pkg |
autoremove [-nvq ]
[-C n]
[ -r
[[-z zonename]... | [-Z zonename]...]]
[ --ignore-missing ]
[--no-index ]
[ --no-be-activate
| --temp-be-activate ]
[--no-backup-be | --require-backup-be ]
[--backup-be-name name]
[--deny-new-be | --require-new-be ]
[--be-name name]
[ --sync-actuators |
--sync-actuators-timeout
timeout] |
pkg |
list [-HafiMmnqRrsuv ]
[-g path_or_uri]...
[--no-refresh ]
[-F format]
[-o column[,column]...]...
[pkg_fmri_pattern ...] |
pkg |
info [-lqr ]
[-g path_or_uri]...
[--license ]
[pkg_fmri_pattern ...] |
pkg |
contents [-Hmr ]
[-a attribute=pattern]...
[-g path_or_uri]...
[-o attribute[,attribute]...]...
[-s sort_key]
[-t action_name[,action_name]...]...
[pkg_fmri_pattern ...] |
pkg |
search [-HIaflpr ]
[-o attribute[,attribute]...]...
[-s repo_uri]
query |
pkg |
verify [-Hqv ]
[-p path]
[--parsable version]
[--unpackaged | --unpackaged-only ]
[pkg_fmri_pattern ...] |
pkg |
fix [-nvq ]
[--accept ] [--licenses ]
[ --no-be-activate
| --temp-be-activate ]
[--no-backup-be | --require-backup-be ]
[--backup-be-name name]
[--deny-new-be | --require-new-be ]
[--be-name name]
[ --parsable version]
[--unpackaged ]
[pkg_fmri_pattern ...] |
pkg |
revert [-nv ]
[ --no-be-activate
| --temp-be-activate ]
[--no-backup-be | --require-backup-be ]
[--backup-be-name name]
[--deny-new-be | --require-new-be ]
[--be-name name]
( --tagged tag_name
... | path_to_file
...) |
pkg |
mediator [-aH ]
[-F format]
[mediator ...] |
pkg |
set-mediator [-nv ]
[-I implementation]
[-V version]
[ --no-be-activate
| --temp-be-activate ]
[--no-backup-be | --require-backup-be ]
[--backup-be-name name]
[--deny-new-be | --require-new-be ]
[--be-name name]
mediator ... |
pkg |
unset-mediator [-nvIV ]
[ --no-be-activate
| --temp-be-activate ]
[--no-backup-be | --require-backup-be ]
[--backup-be-name name]
[--deny-new-be | --require-new-be ]
[--be-name name]
mediator ... |
pkg |
variant [-HAiv ]
[-F format]
[variant_pattern ...] |
pkg |
change-variant [-nvq ]
[-C n]
[-g path_or_uri]...
[ -R | -r
[[-z zonename]... | [-Z zonename]...]]
[ --accept ] [--licenses ]
[ --no-be-activate
| --temp-be-activate ]
[--no-backup-be | --require-backup-be ]
[--backup-be-name name]
[--deny-new-be | --require-new-be ]
[--be-name name]
[ --sync-actuators
| --sync-actuators-timeout timeout]
variant_name=value ... |
pkg |
facet [-Haim ]
[-F format]
[facet_pattern ...] |
pkg |
change-facet [-nvq ]
[-C n]
[-g path_or_uri]...
[ -R | -r
[[-z zonename]... | [-Z zonename]...]]
[ --accept ] [--licenses ]
[ --no-be-activate
| --temp-be-activate ]
[--no-backup-be | --require-backup-be ]
[--backup-be-name name]
[--deny-new-be | --require-new-be ]
[--be-name name]
[ --sync-actuators
| --sync-actuators-timeout timeout]
facet_name=( True |False |None )
... |
pkg |
avoid [pkg_fmri_pattern
...] |
pkg |
unavoid [pkg_fmri_pattern
...] |
pkg |
freeze [-n ]
[-c reason]
[pkg_fmri_pattern ...] |
pkg |
unfreeze [-n ]
[pkg_fmri_pattern ...] |
pkg |
flag [-mM ]
[pkg_fmri_pattern ...] |
pkg |
clean [-v ] |
pkg |
property [-H ]
[propname ...] |
pkg |
set-property propname
propvalue |
pkg |
add-property-value propname
propvalue |
pkg |
remove-property-value propname
propvalue |
pkg |
unset-property propname
... |
pkg |
publisher [-HPn ]
[-F format]
[publisher ...] |
pkg |
set-publisher [-Pedv ]
[-c ssl_cert]
[-k ssl_key]
[-O origin_to_set | --origin-uri origin_to_set]
[-g origin_to_add | --add-origin origin_to_add]
[-G origin_to_remove | --remove-origin origin_to_remove]
[-m mirror_to_add | --add-mirror mirror_to_add]
[-M mirror_to_remove | --remove-mirror mirror_to_remove]
[ -R | -r
[[-z zonename]... | [-Z zonename]...]]
[ --disable ] [--enable ]
[--refresh ] [--reset-uuid ]
[--sticky ] [--non-sticky ]
[--search-first ]
[--search-before publisher]
[--search-after publisher]
[--approve-ca-cert path_to_CA]
[--revoke-ca-cert hash_of_CA_to_remove]
[--unset-ca-cert hash_of_CA_to_remove]
[--set-property name_of_property=value]
[--add-property-value name_of_property=value_to_add]
[--remove-property-value name_of_property=value_to_remove]
[--unset-property name_of_property_to_delete]
[--proxy proxy_to_use]
publisher |
pkg |
set-publisher -p
repo_uri [-Ped ]
[-c ssl_cert]
[-k ssl_key]
[--sticky ] [--non-sticky ]
[--search-first ]
[--search-before publisher]
[--search-after publisher]
[--approve-ca-cert path_to_CA]
[--revoke-ca-cert hash_of_CA_to_remove]
[--unset-ca-cert hash_of_CA_to_remove]
[--set-property name_of_property=value]
[--add-property-value name_of_property=value_to_add]
[--remove-property-value name_of_property=value_to_remove]
[--unset-property name_of_property_to_delete]
[--proxy proxy_to_use]
publisher |
pkg |
unset-publisher publisher
... |
pkg |
history [-HNl ]
[-n number]
[-o column[,column]...]...
[-t time | time-time[,time
| time-time]...]... |
pkg |
purge-history |
pkg |
rebuild-index |
pkg |
update-format |
pkg |
version |
pkg |
help |
pkg |
image-create [-FPUfz ]
[--force ]
[ --full
| --partial | --user ]
[--zone ]
[-c ssl_cert]
[-k ssl_key]
[-g path_or_uri | --origin path_or_uri]...
[-m uri | --mirror uri]...
[--facet facet_name=(True|False)]...
[--no-refresh ]
[--set-property name_of_property=value]
[--variant variant_name=value]
[(-p | --publisher )
[name=]repo_uri]
dir |
pkg |
-R dir
dehydrate [-nvq ]
[-p publisher]... |
pkg |
-R dir
rehydrate [-nvq ]
[-p publisher]... |
pkg
is the client for the Image Packaging
System. With a valid configuration, pkg
can be
invoked to create locations for packages to be installed, called images, and
install packages into those images. Packages are published by publishers,
who can make their packages available at one or more repositories, or in
package archives. pkg
retrieves packages from a
publisher's repository or package archives and installs the packages into an
image.
Packages can only be installed into file systems that are part of a boot environment (BE). For example, on a default OmniOS installation, only datasets under rpool/ROOT/BEname/ are supported for package operations.
A publisher name identifies a person, group of persons, or an organization as the source of one or more packages. To avoid publisher name collisions and help identify the publisher, a best practice is to use a domain name that represents the entity publishing the packages as a publisher name.
A repository is a location where clients can publish and retrieve package content (files contained within the package such as programs and documents) and metadata (information about the package such as its name and description). As an example, a publisher named example.org might have their repository located at the URI http://example.org/repository.
pkg
can also uninstall packages, refresh
publisher metadata (such as the list of available packages), validate
package installation in an image, and query the image for various tokens.
These queries can also be made of
pkg(7).
Images can be of three types: full images, capable of providing a complete system; partial images, which are linked to a full image (parent image), but do not provide a complete system on their own; and user images.
The following global options are supported:
-
? |
--help
-R
dirpkg
refresh
[-q
] [--full
]
[publisher ...]
-q
--full
pkg
install
[-nvq
]
[-C
n]
[-g
path_or_uri]...
[-r
[[-z
zonename]... | [-Z
zonename]...]]
[--accept
] [--licenses
]
[--no-index
] [--no-refresh
]
[--no-be-activate
| --temp-be-activate
]
[--no-backup-be
| --require-backup-be
]
[--backup-be-name
name]
[--deny-new-be
| --require-new-be
]
[--be-name
name]
[--reject
pkg_fmri_pattern]...
[--sync-actuators
| --sync-actuators-timeout
timeout]
pkg_fmri_pattern ...
latest
for the version portion of
pkg_fmri_pattern. For example, specify
vim@latest
. The pkg_fmri_pattern
pattern can include the ? and * characters
as glob(3C)-style wildcards to match one
or more packages.
Versions older or newer than what is already installed can be specified to perform in-place downgrades or upgrades of specific packages. Updating specific packages across package rename or obsolete boundaries is not supported.
Any preserved configuration files that are part of packages to be downgraded and that have been changed since the original version was installed are renamed using the extension .update. For more information about how the package system determines which files to preserve, and how these files are preserved during package upgrades, see "File Actions" in the pkg(7) man page.
Packages are selected based on publisher search order and
stickiness. See the pkg
publisher
and pkg
set-publisher
commands for information about search
order and stickiness. If the pkg_fmri_pattern does not
specify the publisher, the first publisher that provides a matching package
is used as the installation source. If that publisher does not provide a
version of the package that can be installed in this image, then the
installation operation fails. Use the pkg
list
-a
command to see which
publishers provide a version of the package that can be installed in this
image.
If more than one pkg_fmri_pattern is specified, and if any of the specified packages cannot be installed in this image, then none of the specified packages will be installed.
Some configuration files might be renamed or replaced during the installation process. For more information about how the package system determines which files to preserve, and how they are preserved during package operations, see "File Actions" in the pkg(7) man page.
If a package is on the avoid list, installing it removes it from that list.
-C
nPKG_CONCURRENCY
in the
Environment Variables
section and recursion-concurrency in the
Image Properties section.-g
path_or_uriWhen deciding which version of a package to use, publishers
configured in the image, but not found in the specified
path_or_uri sources, take precedence. If the
version of the package to be installed is provided by a publisher
configured in the image and by a path_or_uri
source, the client retrieves the content for that package from the
path_or_uri sources. After installation or update,
any packages provided by publishers not configured in the image are
added to the image configuration without an origin. Use the
pkg
publisher
command to
see which publishers are configured in the image.
-n
-q
-r
pkg
commands in the global
zone, non-global zones are modified only to the extent required to keep
them compatible with the global zone. With this option, the
pkg
operation is applied to all installed
non-global zones except as limited by the -z
and
-Z
options. Zones that are excluded by the
-z
and -Z
options might
still be modified if updates are required to keep them in sync with the
global zone.-z
zonename-z
option can be specified multiple times. The
-z
option can only be used with the
-r
option. The -z
option
cannot be used with the -Z
option.-Z
zonename-Z
option can be specified multiple times. The
-Z
option can only be used with the
-r
option. The -Z
option
cannot be used with the -z
option.-v
This option can be specified multiple times to increase the
amount of planning information displayed. In particular, specifying this
option twice in conjunction with the install
or
update
sub-command, results in more detailed
information about why that sub-command cannot install or update the
specified packages.
--accept
--licenses
--no-index
--no-refresh
--no-be-activate
--temp-be-activate
--temp-be-activate
option manually.--no-backup-be
--require-backup-be
--backup-be-name
name--backup-be-name
implies
--require-backup-be
. See also the
beadm(8) man page.--deny-new-be
--require-new-be
--require-backup-be
.--be-name
name--be-name
implies
--require-new-be
. See also the
beadm(8) man page.--reject
pkg_fmri_pattern--sync-actuators
pkg
command
will not return until all SMF actuators have finished in the zone in which
pkg
was invoked (the global zone or a non-global
zone).--sync-actuators-timeout
pkg
will continue operation and exit with return
code 8.pkg
exact-install
[-nvq
]
[-C
n]
[-g
path_or_uri]...
[--accept
] [--licenses
]
[--no-index
] [--no-refresh
]
[--no-be-activate
| --temp-be-activate
]
[--no-backup-be
| --require-backup-be
]
[--backup-be-name
name]
[--deny-new-be
| --require-new-be
]
[--be-name
name]
[--reject
pkg_fmri_pattern]...
pkg_fmri_pattern ...
exact-install
subcommand
behaves the same way that the install
subcommand
behaves. To explicitly request the latest version of a package, use
latest
for the version portion of
pkg_fmri_pattern. For example, specify
vim@latest
.
Packages are selected based on publisher search order and
stickiness. See the pkg
publisher
and pkg
set-publisher
commands for information about search
order and stickiness. If the pkg_fmri_pattern does not
specify the publisher, the first publisher that provides a matching package
is used as the installation source. If that publisher does not provide a
version of the package that can be installed in this image, then the
installation operation fails. Use the pkg
list
-a
command to see which
publishers provide a version of the package that can be installed in this
image.
If more than one pkg_fmri_pattern is specified, and if any of the specified packages cannot be installed in this image, then none of the specified packages will be installed.
Some configuration files might be renamed or replaced during the installation process. For more information about how the package system determines which files to preserve, and how they are preserved during package operations, see "File Actions" in the pkg(7) man page.
If a package is on the avoid list, installing it removes it from that list.
For descriptions of options, see the
install
sub-command above.
pkg
uninstall
[-nvq
]
[-C
n]
[-r
[[-z
zonename]... | [-Z
zonename]...]]
[--ignore-missing
]
[--no-index
]
[--no-be-activate
| --temp-be-activate
]
[--no-backup-be
| --require-backup-be
]
[--backup-be-name
name]
[--deny-new-be
| --require-new-be
]
[--be-name
name]
[--sync-actuators
| --sync-actuators-timeout
timeout]
pkg_fmri_pattern ...
If a package is the subject of a group dependency, uninstalling it
places it on the avoid list. See the avoid
subcommand below.
In the command output, note any messages that say a new boot environment has been created. If a new boot environment has been created and activated, that is the environment that is booted by default on next reboot. See the beadm(8) man page for information about managing boot environments.
--ignore-missing
pkg
uninstall
from failing
when attempting to uninstall a package that is not currently
installed.For all other options, see the install
command above.
pkg
update
[-fnvq
]
[-C
n]
[-g
path_or_uri]...
[-R
| -r
[[-z
zonename]... | [-Z
zonename]...]]
[--accept
] [--ignore-missing
]
[--licenses
] [--no-index
]
[--no-refresh
]
[--no-be-activate
| --temp-be-activate
]
[--no-backup-be
| --require-backup-be
]
[--backup-be-name
name]
[--deny-new-be
| --require-new-be
]
[--be-name
name]
[--reject
pkg_fmri_pattern]...
[--sync-actuators
| --sync-actuators-timeout
timeout]
[pkg_fmri_pattern ...]
In the command output, note any messages that say a new boot
environment has been created. If a new boot environment has been created and
activated, that is the environment that is booted by default on next reboot
if you do not specify the --no-be-activate
option.
See the beadm(8) man page for
information about managing boot environments.
Recursion can be enabled by default for updates to an image via
the default-recurse image property; if this is set then it
is not necessary to specify the -r
option manually,
however the -R
option can be specified to
temporarily override recursion, see below.
To explicitly request the latest version of a package, use
latest
for the version portion of
pkg_fmri_pattern. For example, specify
vim@latest
.
Versions older or newer than what is already installed can be specified to perform in-place downgrades or upgrades of specific packages. Updating specific packages across package rename or obsolete boundaries is not supported.
Any preserved configuration files that are part of packages to be downgraded and that have been changed since the original version was installed are renamed using the extension .update. For more information about how the package system determines which files to preserve, and how these files are preserved during package upgrades, see "File Actions" in the pkg(7) man page.
If more than one pkg_fmri_pattern is specified, and if any of the specified packages cannot be updated in this image, then none of the specified packages will be updated.
-f
--ignore-missing
pkg
update
from failing
when attempting to update a package that is not currently installed.-R
pkg
update
commands in the global zone, non-global
zones are modified to the extent required to keep them compatible with the
global zone.For all other options, see the install
command above.
pkg
apply-hot-fix
[-nvq
]
[-C
n]
[-g
path_or_uri]...
[-R
| -r
[[-z
zonename]... | [-Z
zonename]...]]
[--accept
] [--ignore-missing
]
[--licenses
] [--no-index
]
[--no-refresh
]
[--no-be-activate
| --temp-be-activate
]
[--no-backup-be
| --require-backup-be
]
[--backup-be-name
name]
[--deny-new-be
| --require-new-be
]
[--be-name
name]
path_or_uri [pkg_fmri_pattern
...]
In the command output, note any messages that say a new boot
environment has been created. If a new boot environment has been created and
activated, that is the environment that is booted by default on next reboot
if you do not specify the --no-be-activate
option.
See the beadm(8) man page for
information about managing boot environments.
If more than one pkg_fmri_pattern is specified, and if any of the specified packages cannot be updated in this image, then none of the specified packages will be updated.
For all other options, see the install
command above.
pkg
autoremove
[-nvq
]
[-C
n]
[-r
[[-z
zonename]... | [-Z
zonename]...]]
[--ignore-missing
]
[--no-index
]
[--no-be-activate
| --temp-be-activate
]
[--no-backup-be
| --require-backup-be
]
[--backup-be-name
name]
[--deny-new-be
| --require-new-be
]
[--be-name
name]
[--sync-actuators
|
--sync-actuators-timeout
timeout]
pkg
list
-rM
.
Packages are marked as manually installed if they were given as
arguments to a pkg
install
command, or if they were flagged as manually installed using the
pkg
flag
-m
command. Packages marked in this way are ignored
by autoremove
.
pkg
list
[-HafiMmnqRrsuv
]
[-g
path_or_uri]...
[--no-refresh
]
[-F
format]
[-o
column[,column]...]...
[pkg_fmri_pattern ...]
NAME (PUBLISHER) VERSION IFO entire 11-151037.0 i-- ooce/developer/cmake (extra.omnios) 3.19.5-151037.0 im-
The last column contains a set of flags that show the status of the package:
-F
format-H
-a
-a
, only installed packages are listed.-af
latest
for the version portion of
pkg_fmri_pattern. For example, specify
vim@latest
.-g
path_or_uri-g
implies
-a
if -n
is not
specified.-i
-M
This can be usefully combined with -r
to show automatically installed packages which can likely be
removed.
-m
pkg
install
command, or were flagged using
pkg
flag
-m
.-n
-o
column[,column]...branch
flags
fmri
name
namepub
osrelease
publisher
release
summary
timestamp
version
release
and branch
components of the version separated by a hyphen
‘-’.-q
-r
-R
-r
option above. However,
-R
also lists removable system packages,
identifying them with a S in the F
flags column.-s
-a
,
-n
, or -u
.-u
-g
.-v
-a
, -n
, or
-u
.--no-refresh
pkg
info
[-lqr
]
[-g
path_or_uri]...
[--license
] [pkg_fmri_pattern
...]
-g
path_or_uri-g
implies
-r
.-l
-q
-r
-r
, only installed packages are displayed by
default.--license
-l
, -q
, or
-r
. Return success if all
pkg_fmri_pattern patterns match known packages and
have licenses. Return failure if one or more patterns are unmatched or
match packages that do not have licenses.pkg
contents
[-Hmr
]
[-a
attribute=pattern]...
[-g
path_or_uri]...
[-o
attribute[,attribute]...]...
[-s
sort_key]
[-t
action_name[,action_name]...]...
[pkg_fmri_pattern ...]
-o
option is not specified, the key attributes, as described in
pkg(7), of the related action name will be
displayed instead. In addition, depend actions will also
include the
type
attribute, and set actions will include the
value attribute.
When more than one action name is specified, the default attributes are the set of all attributes, as described above, of all the specified actions. For information about actions and their attributes, see 'Actions' in the pkg(7) man page. See also the list of pseudo attribute names below.
-H
-a
attribute=pattern-a
options are given, then actions that match any
of them are displayed.-g
path_or_uri-g
implies
-r
.-m
-o
attribute-o
option can be
specified multiple times, or multiple attributes can be specified as the
argument to one -o
option by separating the
attribute names with commas. Only actions that have the requested
attributes are displayed.-r
-s
sort_key-o
option. The -s
option
can be specified multiple times.-t
action_name-t
option can
be specified multiple times, or multiple actions can be specified as the
argument to one -t
option by separating the action
names with commas. The value of action_name is one
of the actions listed in "Actions" in the
pkg(7) man page, such as
file,
directory,
driver, depend,
set.Several special pseudo attribute names are available for convenience:
The contents
and
search
subcommands are related; both query the
system for the contents of packages. The contents
subcommand displays actions in one or more installed or installable
packages, filtering the output based on the specified options. The
search
subcommand approaches the query from the
other direction, displaying the names of all packages that contain a
user-supplied token.
Each subcommand is capable of formulating some queries of which the other is capable. Care should be taken in choosing the subcommand, as a given query can be more naturally formulated in one than in the other.
pkg
search
[-HIaflpr
]
[-o
attribute[,attribute]...]...
[-s
repo_uri]
query
-H
-I
-a
-f
search
prunes results from packages older than the
currently installed version and from package versions excluded by current
incorporations.-l
Both -l
and -r
(or -s
) can be specified together, in which case
both local and remote searches are performed.
-o
attribute-o
option can be specified multiple times, or
multiple attributes can be specified as the argument to one
-o
option by separating the attribute names with
commas. In addition to the pseudo attributes outlined above, the following
attributes are defined for search results. These attributes help show why
a particular result was a match:
-p
-r
Both -l
and -r
(or -s
) can be specified together, in which case
both local and remote searches are performed.
-s
repo_uripkg
repository located at the given
URI. This can be specified multiple times. Package archives are not
supported.AND and OR are supported.
The ? and * characters can be used as glob(3C)- style wildcards, allowing more flexible query matches.
In addition to simple token matching and wildcard
search, a more complicated query language is supported. Phrases can be
searched for by using single or double quotation marks
('
or "). Be sure to take
your shell into account so that pkg
actually
sees these characters.
Which tokens are indexed is action-dependent, but can include
content hashes and path names. For information about actions and their
attributes, see "Actions" in the
pkg(7) man page. See also the list of
pseudo attribute names in pkg
contents
and -o
above.
Structured queries are supported with the following syntax:
The value of action_name is one of the actions listed in "Actions" in the pkg(7) man page. The index is an attribute of the action. The value of index must match token.
Not all action attributes are searchable. For example, mode is an attribute of the file action, but mode is not a valid value for index.
Some values for index are not action attributes but are values derived from other attributes. For example, index can be basename, which is not an attribute of any action but is derived from the path attribute of the file or dir action by taking the last component of the path.
Different action types have different valid values for index. This documentation does not list all possible values. Some of the more useful index values are basename and path for file system actions, the dependency type (for example, require, optional, group) for depend actions, and driver_name and alias for driver actions.
One special value for index is the value of a name attribute for a set action. In this case, token is matched against the value of the value attribute that corresponds to the specified name attribute. For example, the following search finds packages that are classified as either Development/Databases or System/Databases. In the Examples section, see the example of finding SMF services.
$ pkg search info.classification:databases
Missing fields in a structured query are implicitly wildcarded. A search for basename:pkg matches all actions in all packages that have an index of basename and that match the token pkg, as shown in the following partial output:
$ pkg search basename:pkg INDEX ACTION VALUE PACKAGE basename dir usr/share/pkg pkg:/package/pkg@0.5.11 basename dir var/sadm/pkg pkg:/package/svr4@0.5.11 basename dir var/spool/pkg pkg:/package/svr4@0.5.11 basename file usr/bin/pkg pkg:/package/pkg@0.5.11
Adding another field narrows the search, as shown in the following complete output:
$ pkg search file:basename:pkg INDEX ACTION VALUE PACKAGE basename file usr/bin/pkg pkg:/package/pkg@0.5.11
Explicit wildcards are supported in the pkg_name and token fields. The action_name and index must match exactly.
See the Examples section for examples of searching for files and dependencies.
To convert actions to the packages that contain those actions, use ⟨⟩, as shown in the following partial output:
$ pkg search \<pkg\> PACKAGE PUBLISHER pkg:/package/pkg@0.5.11-151036.0 omnios pkg:/package/svr4@0.5.11-151036.0 omnios
With the -a
option (and by default),
searching for token results in information about the
actions that match token, while searching for
⟨token⟩ results in a list of packages that contain actions
that match token.
pkg
verify
[-Hqv
]
[-p
path]
[--parsable
version]
[--unpackaged
| --unpackaged-only
]
[pkg_fmri_pattern ...]
-p
, only the maching
actions from the specified packages will be verified.-H
-p
pathIf no pkg_fmri_patterns are provided when specifying paths, all matching actions from packages installed in the image will be verified.
--parsable
version-q
.-q
--unpackaged
--parsable
.--unpackaged-only
--parsable
.-v
pkg
fix
[-nvq
] [--accept
]
[--licenses
]
[--no-be-activate
| --temp-be-activate
]
[--no-backup-be
| --require-backup-be
]
[--backup-be-name
name]
[--deny-new-be
| --require-new-be
]
[--be-name
name]
[--parsable
version]
[--unpackaged
]
[pkg_fmri_pattern ...]
pkg
verify
. Verification of
installed package content is based on a custom content analysis that might
return different results than those of other programs.
pkg
verify
for only the specified packages installed
in the current image.--accept
--licenses
--parsable
version-q
.--unpackaged
For all other options, see the install
command above.
pkg
revert
[-nv
]
[--no-be-activate
| --temp-be-activate
]
[--no-backup-be
| --require-backup-be
]
[--backup-be-name
name]
[--deny-new-be
| --require-new-be
]
[--be-name
name]
(--tagged
tag_name
... | path_to_file
...)
--tagged
tag-nameFor all other options, see the install
command above.
pkg
mediator
[-aH
]
[-F
format]
[mediator ...]
-F
format-H
-a
pkg
set-mediator
[-nv
]
[-I
implementation]
[-V
version]
[--no-be-activate
| --temp-be-activate
]
[--no-backup-be
| --require-backup-be
]
[--backup-be-name
name]
[--deny-new-be
| --require-new-be
]
[--be-name
name] mediator
...
-I
implementation-V
versionIf the specified mediator version and/or implementation is not currently available, any links using the specified mediators are removed. If, during an update, the mediated link target is removed, a warning will be produced indicating this. If the update had created a new boot environment, the boot environment will be left mounted and not activated.
For all other options, see the install
command above.
pkg
unset-mediator
[-nvIV
]
[--no-be-activate
| --temp-be-activate
]
[--no-backup-be
| --require-backup-be
]
[--backup-be-name
name]
[--deny-new-be
| --require-new-be
]
[--be-name
name] mediator
...
-I
-V
For all other options, see the install
command above.
pkg
variant
[-HAiv
] [-F
format] [variant_pattern
...]
-F
formatpkg
mediator
command.-H
-a
-a
option cannot
be combined with the -i
option.-i
-i
option cannot be combined with the
-a
option.-v
-v
option can be combined with the
-a
or -i
options.pkg
change-variant
[-nvq
]
[-C
n]
[-g
path_or_uri]...
[-R
| -r
[[-z
zonename]... | [-Z
zonename]...]]
[--accept
] [--licenses
]
[--no-be-activate
| --temp-be-activate
]
[--no-backup-be
| --require-backup-be
]
[--backup-be-name
name]
[--deny-new-be
| --require-new-be
]
[--be-name
name]
[--sync-actuators
| --sync-actuators-timeout
timeout]
variant_name=value
...
Changing the value of a variant can cause package content to be removed, updated, or installed. Changing a variant value can also cause entire packages to be installed, updated, or removed to satisfy the new image configuration. See "Facets and Variants" in the pkg(7) man page for more information about variants.
For descriptions of the options, see the
install
command above.
pkg
facet
[-Haim
] [-F
format] [facet_pattern
...]
pkg
change-facet
command or
have been inherited from a parent image (such as a non-global zone inheriting
the facet setting from the global zone). See "Facets and Variants"
in the pkg(7) man page for more information
about facets.
-F
formatpkg
mediator
command.-H
-a
-a
option cannot
be combined with the -i
option.-i
-i
option cannot be combined with the
-a
option.-m
pkg
change-facet
command) that are hidden by an
inherited facet with the same name.pkg
change-facet
[-nvq
]
[-C
n]
[-g
path_or_uri]...
[-R
| -r
[[-z
zonename]... | [-Z
zonename]...]]
[--accept
] [--licenses
]
[--no-be-activate
| --temp-be-activate
]
[--no-backup-be
| --require-backup-be
]
[--backup-be-name
name]
[--deny-new-be
| --require-new-be
]
[--be-name
name]
[--sync-actuators
| --sync-actuators-timeout
timeout]
facet_name=(True
|False
|None
)
...
Facets can be set to True or False. Setting a facet to None applies the default value of True to that facet; thus, any actions subject to the facet will be installed. See "Actions" in the pkg(7) man page for information about actions.
Changing the value of a facet can cause package content to be removed, updated, or installed. Changing a facet value can also cause entire packages to be installed, updated, or removed to satisfy the new image configuration. See "Facets and Variants" in the pkg(7) man page for more information about facets.
For dscriptions of the options, see the
install
command above.
pkg
avoid
[pkg_fmri_pattern ...]
Packages that are on the avoid list are installed if needed to satisfy a required dependency. If that dependency is removed, the package is uninstalled.
pkg
unavoid
[pkg_fmri_pattern ...]
pkg
freeze
[-n
] [-c
reason] [pkg_fmri_pattern
...]
Freezing a package does not prevent removal of the package. No warning is displayed if the package is removed.
When a package that is frozen is installed or updated, it must end up at a version that matches the version at which it was frozen. For example, if a package was frozen at 1.2, then it could be updated to 1.2.1, 1.2.9, 1.2.0.0.1, and so on. That package could not end up at 1.3, or 1.1. A publisher presented in the pkg_fmri_pattern is used to find matching packages. However, publisher information is not recorded as part of the freeze. A package is frozen with respect to its version only, not its publisher.
-c
reason-n
pkg
unfreeze
[-n
] [pkg_fmri_pattern
...]
-n
pkg
flag
[-mM
] [pkg_fmri_pattern
...]
pkg
clean
[-v
]
-v
pkg
property
[-H
] [propname
...]
-H
pkg
set-property
propname propvalue
pkg
add-property-value
propname
propvalue
pkg
remove-property-value
propname
propvalue
pkg
unset-property
propname ...
pkg
publisher
[-HPn
] [-F
format] [publisher
...]
-F
tsv
option or specify the publisher name argument.
Proxies shown by the pkg
publisher
command were set by using the
--proxy
option of the pkg
set-publisher
command. Proxies set by using an
http_proxy
environment variable are not shown by the
pkg
publisher
command.
-F
formattsv
(Tab
Separated Values).-H
-P
-n
pkg
set-publisher
[-Pedv
]
[-c
ssl_cert]
[-k
ssl_key]
[-O
origin_to_set | --origin-uri
origin_to_set]
[-g
origin_to_add | --add-origin
origin_to_add]
[-G
origin_to_remove | --remove-origin
origin_to_remove]
[-m
mirror_to_add | --add-mirror
mirror_to_add]
[-M
mirror_to_remove | --remove-mirror
mirror_to_remove]
[-R
| -r
[[-z
zonename]... | [-Z
zonename]...]]
[--disable
] [--enable
]
[--refresh
] [--reset-uuid
]
[--sticky
] [--non-sticky
]
[--search-first
]
[--search-before
publisher]
[--search-after
publisher]
[--approve-ca-cert
path_to_CA]
[--revoke-ca-cert
hash_of_CA_to_remove]
[--unset-ca-cert
hash_of_CA_to_remove]
[--set-property
name_of_property=value]
[--add-property-value
name_of_property=value_to_add]
[--remove-property-value
name_of_property=value_to_remove]
[--unset-property
name_of_property_to_delete]
[--proxy
proxy_to_use]
publisher
-G
origin_to_remove |
--remove-origin
origin_to_remove-M
mirror_to_remove |
--remove-mirror
mirror_to_remove-O
origin_to_set |
--origin-uri
origin_to_set-r
-z
zonename-z
option can be specified multiple times. The
-z
option can only be used with the
-r
option. The -z
option
cannot be used with the -Z
option.-Z
zonename-Z
option can be specified multiple times. The
-Z
option can only be used with the
-r
option. The -Z
option
cannot be used with the -z
option.-P
|
--search-first
-c
ssl_cert-d
|
--disable
-e
|
--enable
-g
origin_to_add |
--add-origin
origin_to_add--enable
or
--disable
, the origins will be enabled or disabled
as specified. In this case, *
can be used to
enable or disable all origins.-k
ssl_key-m
mirror_to_add |
--add-mirror
mirror_to_add--add-property-value
name=value--approve-ca-cert
path-to-CApkg
publisher
command.--no-refresh
--non-sticky
--proxy
proxy_to_use-g
) or mirror (-m
). The
proxy value is stored as part of the publisher configuration, which means
the system repository used by child images is automatically updated. This
option cannot be used to set an authenticated proxy. The
proxy_to_use value cannot have the form
protocol://user:password@host.
At run time,
http_proxy
or related environment variables
override this proxy setting. See the "Environment" section of
the curl(1) man page for the list of
accepted environment variable names. If you use an environment variable
to set the proxy URI, you must also set the appropriate proxy property
of the
svc:/application/pkg/system-repository
SMF service to the same value.
--remove-property-value
--reset-uuid
--revoke-ca-cert
CA_hashpkg
publisher
command.--search-after
publisher--search-before
publisher--set-property
name=value--sticky
--unset-ca-cert
CA_hash--unset-property
name-v
pkg
set-publisher
-p
repo_uri
[-Ped
]
[-c
ssl_cert]
[-k
ssl_key]
[--sticky
] [--non-sticky
]
[--search-first
]
[--search-before
publisher]
[--search-after
publisher]
[--approve-ca-cert
path_to_CA]
[--revoke-ca-cert
hash_of_CA_to_remove]
[--unset-ca-cert
hash_of_CA_to_remove]
[--set-property
name_of_property=value]
[--add-property-value
name_of_property=value_to_add]
[--remove-property-value
name_of_property=value_to_remove]
[--unset-property
name_of_property_to_delete]
[--proxy
proxy_to_use]
publisher
If a publisher operand is specified to this
set-publisher
subcommand, then only that publisher
is added or updated. If no publisher is specified, all publishers in
repo_uri are added or updated as appropriate.
For descriptions of options, see the
set-publisher
command above. When used with
-p
, the -P
,
--search-first
,
--search-before
, and
--search-after
options only apply to added
publishers, not to updated publishers.
The -p
option cannot be combined with the
-g
, --add-origin
,
-G
, --remove-origin
,
-m
, --add-mirror
,
-M
, --origin-uri
,
-O
, --remove-mirror
,
--disable
, --enable
,
--no-refresh
, or
--reset-uuid
options.
pkg
unset-publisher
publisher
...
pkg
history
[-HNl
]
[-n
number]
[-o
column[,column]...]...
[-t
time | time-time[,time
| time-time]...]...
install
), the client (for example,
pkg
), and the outcome of the operation (Succeeded or
Failed).
-H
-l
update
, complete FMRIs of changed packages are
shown.-N
-n
number-o
column-o
option can be specified multiple times, or
multiple column names can be specified as the argument to one
-o
option by separating the column names with
commas.
Valid column names are:
be
be_uuid
client
client_ver
command
finish
id
new_be
new_be_uuid
operation
outcome
reason
release_note
snapshot
start
time
user
If the command
or
reason
columns are specified, they must be the
last item in the -o
list, in order to preserve
output field separation. These two columns cannot be shown in the same
history
command.
An asterisk (*) is shown after the values for
be
or new_be
if the boot
environment is no longer present on the system.
The values for be
and
new_be
are obtained by looking up the current
boot environment name, using the be_uuid
or
new_be_uuid
fields. If a boot environment was
subsequently renamed, and later deleted, the values displayed for
be
and new_be
are the
values recorded at the time of the pkg
operation.
-t
time |
-
time-timepkg
purge-history
pkg
rebuild-index
pkg
search
. This is a recovery
operation not intended for general use.pkg
update-format
pkg
version
pkg
. This string is not guaranteed to be comparable in
any fashion between versions.pkg
help
pkg
image-create
[-FPUfz
] [--force
]
[--full
| --partial
| --user
]
[--zone
]
[-c
ssl_cert]
[-k
ssl_key]
[-g
path_or_uri | --origin
path_or_uri]...
[-m
uri | --mirror
uri]...
[--facet
facet_name=(True|False)]...
[--no-refresh
]
[--set-property
name_of_property=value]
[--variant
variant_name=value]
[(-p
| --publisher
)
[name=]repo_uri] dir
image-create
subcommand are not bootable. Most users
should use the --be-name
or
--require-new-be
options with
pkg
commands, or use the
beadm(8) or
zoneadm(8) commands to create images.
The pkg
image-create
command
is used for tasks such as maintaining packages and operating system
distributions.
The default image type is user, which can be specified by using
the -U
or --user
option.
Alternatively, the image type can be set to a full image
(-F
or
--full
) or to a partial image
(-P
or
--partial
) linked to the full image enclosing the
given dir path.
Additional origins can be specified using
-g
or --origin
. Additional
mirrors can be specified using -m
or
--mirror
.
A package repository URI must be provided using the
-p
or --publisher
option. If
a publisher name is also provided, then only that publisher is added when
the image is created. If a publisher name is not provided, then all
publishers known by the specified repository are added to the image. An
attempt to retrieve the catalog associated with this publisher is made
following the initial creation operations.
For publishers using client SSL authentication, a client key and
client certificate can be registered via the -c
and
-k
options. This key and certificate are used for
all publishers added during image creation.
If the image is to be run within non-global zone context, use the
-z
(--zone
) option to set an
appropriate variant.
-f
|
--force
--facet
name=(True
|False
)--no-refresh
--set-property
name=value--variant
name=valuepkg
-R
dir dehydrate
[-nvq
] [-p
publisher]...
-R
option to
create a fully dehydrated image. A non-editable packaged file is a file
delivered by the currently installed version of a package that has no
preserve
or
overlay
attribute, and does not have a
dehydrate
attribute set to
false. A
packaged hardlink is a hardlink delivered by the currently installed version
of a package.
The pkg
dehydrate
command only operates on an alternate root. Use the
-R
option to specify the alternate root. If the
alternate root belongs to a boot environment, dehydration will render it
unbootable.
If the pkg
dehydrate
command succeeds, a property named
dehydrated with the value of all publishers with a
configured package repository is set on the image specified by the
-R
option.
All other packaging operations for a dehydrated publisher will be automatically dehydrated.
-p
publisherIf one or more publishers is specified, and if any of the publishers is not configured in the image, then nothing is removed from the image.
If the pkg
dehydrate
command succeeds, a property named
dehydrated with the names of the publishers as the
value is set on the image.
For all other options, see the install
command above.
pkg
-R
dir rehydrate
[-nvq
] [-p
publisher]...
pkg
dehydrate
command.
The pkg
rehydrate
command only operates on an alternate root. Use the
-R
option to specify the alternate root.
If the pkg
rehydrate
command succeeds, the value of the
dehydrated property of the image is removed.
-p
publisherpkg
dehydrate
command for
the specified publishers.
If one or more publishers is specified, and if any of the publishers is not configured in the image, then nothing is installed.
If the pkg
rehydrate
command succeeds, the specified
publisher names are removed from the value of the
dehydrated property set on the image.
For all other options, see the install
command above.
Daemons or other programs that need to know the time an image was
last modified can consult the time stamp on the file
/var/pkg/modified. The time stamp on
/var/pkg/modified is updated every time an operation
occurs that modifies the image. Use the pkg
history
command to display information about the
change at that time.
The following properties define characteristics of the image.
These properties store information about the purpose, content, and behaviour
of the image. To view the current values of these properties in the image,
use the pkg
property
command. To modify the values of these properties, use the
pkg
set-property
and
pkg
unset-property
commands.
auto-be-name
--be-name
option is not provided, the new BE will
be named after the current, with an incrementing numerical suffix. If an
update requires a new boot environment but is not associated with an
OmniOS release then the template will not be used. The
--be-name
option always overrides this property.
The template can contain the following tokens; see the
Examples section for some suggested
values.
%d
%D
%r
time
:formatThe default value for the
auto-be-name
property is
“omnios-r%r”.
be-policy
default
create-backup
.always-new
This policy is the safest, but is more strict than most sites need since no packages can be added without a reboot.
create-backup
This policy is potentially risky only if newly installed software causes system instability, which is possible but relatively rare.
when-required
This policy carries the greatest risk since if a packaging change to the live boot environment makes further changes impossible, there might be no recent boot environment to which one can fallback.
ca-path
Default value: /etc/ssl/certs
check-certificate-revocation
Default value: False
content-update-policy
default
always
when-required
Default value: always
default-recurse
pkg
update
operations, as if the
-r
option had been provided on the command line.
This behaviour can be overriden on a per-case basis via the
-R
option.
Default value: False
exclude-patterns
.*
’ and should
include a trailing ‘$
’.
Default value: [] (empty list)
exclude-policy
exclude-patterns
property. The following values
are allowed:
ignore
warn
reject
Default value: warn
.
NB: The sparse brand installer sets this
property to reject
for sparse zone images.
flush-content-cache-on-success
This property can be used to keep the content-cache small on systems with limited disk space. This property can cause operations to take longer to complete.
Even when set to False, the content cache
can be manually cleaned up as required by running the
pkg
clean
command.
Default value: True
key-files
pkg
will refuse to perform update operations on
the image.
Default value: [] (empty list)
mirror-discovery
Default value: False
recursion-concurrency
-C
option to
pkg
install
above for more
details.
Default value: 1
send-uuid
Default value: True
signature-policy
ignore
verify
require-signatures
pkg
fix
and pkg
verify
commands also warn if an installed package does not have a valid
signature.require-names
require-signatures
but also require that the
strings listed in the signature-required-names
property appear as a common name of the certificates used to verify
the chains of trust of the signatures.signature-required-names
trust-anchor-directory
use-system-repo
temp-be-activation
--temp-be-activate
option had
been provided on the command line.
Default value: False
The following properties define properties for a particular
publisher. To view the current values of these properties for a particular
publisher, use the pkg
publisher
publisher_name
command. To modify the values of these publisher properties, use the
--set-property
and
--unset-property
options of the
pkg
set-publisher
command.
nochild
False
.signature-policy
signature-required-names
Create a new, full image, with publisher example.com, stored at /aux0/example_root.
$ pkg image-create -F \ -p example.com=http://pkg.example.com:10000 \ /aux0/example_root
Create a new, full image, with publisher example.com, that also has an additional mirror, two additional origins, and is stored at /aux0/example_root.
$ pkg image-create -F \ -p example.com=http://pkg.example.com:10000 \ -g http://alternate1.example.com:10000/ \ -g http://alternate2.example.com:10000/ \ -m http://mirror.example.com:10000/ \ /aux0/example_root
Create a new, full image with no publishers configured at /aux0/example_root.
$ pkg image-create -F /aux0/example_root
Install the latest version of the widget package in the current image.
$ pkg install application/widget
List the contents of the system/file-system/zfs package. Display the action name, the mode of the file (if defined), the size (if defined), the path, and the target (if a link). Limit the action to types dir, file, link, and hardlink, since specifying the action.name attribute, which is available for all actions, displays a line for all actions, which is not desired here.
$ pkg contents -t dir,file,link,hardlink \ -o action.name,mode,pkg.size,path,target \ system/file-system/zfs ACTION.NAME MODE PATH TARGET dir 0755 etc dir 0755 etc/fs dir 0755 etc/fs/zfs link etc/fs/zfs/mount ../../../usr/sbin/zfs link etc/fs/zfs/umount ../../../usr/sbin/zfs dir 0755 etc/zfs ...
List the contents of web/browser/firefox and mail/thunderbird, limiting the display to just the package name and path attributes of actions whose path attribute ends in .desktop or .png.
$ pkg contents -o pkg.name,path -a path=\*.desktop \ -a path=\*.png web/browser/firefox mail/thunderbird PKG.NAME PATH web/browser/firefox usr/share/applications/firefox.desktop mail/thunderbird usr/share/applications/thunderbird.desktop web/browser/firefox usr/share/pixmaps/firefox-icon.png mail/thunderbird usr/share/pixmaps/thunderbird-icon.png ...
Search the package database for the token bge.
$ pkg search bge INDEX ACTION VALUE PACKAGE driver_name driver bge pkg:/driver/network/bge basename file kernel/drv/bge pkg:/driver/network/bge ...
Search for the package that delivers a file by specifying the full path name of the file, including the leading slash character.
$ pkg search -o path,pkg.name -l /usr/bin/vim PATH PKG.NAME usr/bin/vim editor/vim/vim-core
Search for a file and the package that delivers that file by specifying file for the action_name, path or basename for the index, and the full or partial file name for the token.
$ pkg search -o path,pkg.name -l file:basename:vim PATH PKG.NAME usr/bin/vim editor/vim/vim-core
Search for files and directories and the packages that deliver them by specifying path or basename for the index and the full or partial file name for the token. Depending on your shell, you might need to escape wildcards.
$ pkg search -o path,pkg.name -l path:*/vim PATH PKG.NAME usr/bin/vim editor/vim/vim-core usr/share/vim editor/vim usr/share/vim editor/vim/vim-core $ pkg search -o path,pkg.name -l basename:vim PATH PKG.NAME usr/share/vim editor/vim usr/share/vim editor/vim/vim-core usr/bin/vim editor/vim/vim-core
Show which packages provide a particular SMF service by specifying the value org.opensolaris.smf.fmri for the index in a structured search and the name of the service you want to find for the token. The value org.opensolaris.smf.fmri is the name of an attribute of a set action. Remember to escape the : in the name of the service.
For example, show which HTTP servers are available by specifying the value svc:/network/http for the token.
$ pkg search 'org.opensolaris.smf.fmri:svc/network/ntp' INDEX ACTION VALUE PACKAGE org.opensolaris.smf.fmri set svc:/network/ntp ntpsec
Search for installed packages that depend on package/pkg.
$ pkg search -l 'depend::package/pkg' INDEX ACTION VALUE PACKAGE incorporate depend package/pkg@0 pkg:/ips- incorporation@11 require depend package/pkg@0 pkg:/system/install@11 require depend package/pkg@0 pkg:/system-repository@11
Search for all incorporate dependencies in installed packages.
$ pkg search -l 'depend:incorporate:' INDEX ACTION VALUE PACKAGE incorporate depend pkg:/BRCMbnx@0 pkg:/osnet-incorporation@1 incorporate depend pkg:/BRCMbnxe@0 pkg:osnet-incorporation@1 ...
Add a new publisher example.com, with a repository located at http://www.example.com/repo.
$ pkg set-publisher -g http://www.example.com/repo example.com
Add a new publisher example.com, with a secure repository located at https://secure.example.com/repo, and a key and certificate stored in the directory /root/creds.
$ pkg set-publisher -k /root/creds/example.key \ -c /root/creds/example.cert \ -g https://secure.example.com/repo \ example.com
Add a new publisher with a repository located at /export/repo using automatic configuration.
$ pkg set-publisher -p /export/repo
Add a new publisher example.com with a repository located at /export/repo/example.com using manual configuration.
$ pkg set-publisher -g /export/repo example.com
Add a new publisher mypub with origin http://server/repo and proxy http://webcache:8080.
$ pkg set-publisher -g http://server/repo \ --proxy http://webcache:8080 mypub
Configure an image to verify all signed packages.
$ pkg set-property signature-policy verify
Configure an image to require all packages to be signed, and require the string example.com to be seen as a common name for one of the certificates in the chain of trust.
$ pkg set-property signature-policy require-names example.com
Configure an image so that all packages installed from publisher example.com must be signed.
$ pkg set-publisher \ --set-property signature-policy=require-signatures \ example.com
Add the string foo to the image's list of common names that must be seen in a signature's chain of trust to be considered valid.
$ pkg add-property-value signature-require-names foo
Remove the string foo from the list of common names that must be seen to validate a signature for the publisher example.com.
$ pkg set-publisher --remove-property-value \ signature-require-names=foo example.com
Add the certificate stored in /tmp/example_file.pem as a trusted CA certificate for the publisher example.com.
$ pkg set-publisher --approve-ca-cert /tmp/example_file.pem \ example.com
Revoke the certificate with the hash a12345 for publisher example.com, preventing the certificate from validating any signatures for packages from example.com.
$ pkg set-publisher --revoke-ca-cert a12345 example.com
Make pkg forget that the certificate a12345 was ever added or revoked by the user.
$ pkg set-publisher --unset-ca-cert a12345 example.com
Downgrade the installed package foo@1.1 to an older version.
$ pkg update foo@1.0
In the case of two conflicting packages, change which package is installed. Suppose package A depends on either package B or package C, and B and C are mutually exclusive. If A and B are installed, use the following command to switch to using C instead of B without uninstalling A:
$ pkg install --reject B C
List all versions of all packages in a package archive.
$ pkg list -f -g /my/archive.p5p
List all versions of all packages in a repository.
$ pkg list -f -g http://example.com:10000
Display the package information for the latest version of a package in a package archive. The package might or might not be currently installed.
$ pkg info -g /my/archive.p5p pkg_name
Display the contents of a package in a package archive. The package is not currently installed.
$ pkg contents -g /my/archive.p5p pkg_name
Remove all of the origins and mirrors for a publisher and add a new origin.
$ pkg set-publisher -G '*' -M '*' \ -g http://example.com:10000 \ example.com
In these examples, /tmp/test_image is the image that you want to dehydrate and rehydrate.
Because no publisher is specified, the following command operates on all publishers with a configured package repository in the /tmp/test_image image to fully dehydrate the /tmp/test_image image.
$ pkg -R /tmp/test_image dehydrate
Since no publisher is specified, the following command operates on all publishers configured in the /tmp/test_image image to fully restore the /tmp/test_image image.
$ pkg -R /tmp/test_image rehydrate
In these examples, /tmp/test_image is the image that you want to dehydrate and rehydrate, and the test1 and test2 publishers are configured with a package repository in the /tmp/test_image image.
The following command operates only on files and hardlinks delivered by the test1 publisher.
$ pkg -R /tmp/test_image dehydrate -p test1
The following command rehydrates only files and hardlinks delivered by the test1 publisher.
$ pkg -R /tmp/test_image rehydrate -p test1
Apply a hot-fix from a package archive file hosted on a remote web server into a new boot environment called testbe.
$ pkg apply-hot-fix --be-name=testbe \ https://downloads.omnios.org/pkg/bloody/hotfix-1234.p5p
The following will result in boot environments which include the release name and date, for example omnios_r151026k_20180716.
$ pkg set-property auto-be-name omnios_r%r_%D
To use the current date and time, use the time: prefix and a format string:
$ pkg set-property auto-be-name time:omnios_%Y%m%d
For bloody releases, the release name does not change and so the %r token is not available. The %D token can be used to include the release date in the BE name:
$ pkg set-property auto-be-name bloody_%D
Verify an individual file at path /usr/bin/ls and display verbose result.
$ pkg verify -v -p /usr/bin/ls
-R
is specified.Default value: 60
Default value: 30
Default value: 4
Default value: 5
-C
option is specified.
When recursing into child images (usually installed lipkg, sparse or pkgsrc branded non-global zones), update at most $PKG_CONCURRENCY child images in parallel. If $PKG_CONCURRENCY is 0 or a negative number, all child images are updated in parallel.
Default value: 1
Default value: 4
A pkg(7) image can be located
arbitrarily within a larger file system. In the following file descriptions,
the token $IMAGE_ROOT is used to distinguish relative
paths. For a typical system installation, $IMAGE_ROOT is
equivalent to ‘/
’
Within a particular image's metadata, certain files and directories can contain information useful during repair and recovery. The token $IMAGE_META refers to the top-level directory containing the metadata. $IMAGE_META is typically one of the two paths given above.
Other paths within the $IMAGE_META directory hierarchy are private and are subject to change.
The command line interface of pkg
is
Uncommitted.
The output of pkg
is
Not-An-Interface
and may change at any time.
curl(1), pkgsend(1), glob(3C), strftime(3C), SSL_CTX_load_verify_locations(3openssl), pkg(7), beadm(8), pkg.depotd(8), pkg.sysrepo(8), zoneadm(8)
July 20, 2023 | OmniOS |