Adding and Updating Software in Oracle® Solaris 11.2

Exit Print View

Updated: July 2014
 
 

Updating a Package

You can use either the install or update subcommand to update an installed package to the newest version of the package that is compatible with the rest of the image from the publisher that provided the currently installed version. To avoid unintentionally installing a package that was not already installed, use the pkg update command to update packages.

If the image has more than one publisher enabled, you can control which publisher provides a package by setting publisher stickiness and search order or by specifying the publisher in the package FMRI. You can also specify the version you want to install in the package FMRI. To explicitly request the newest version of a package, use the keyword latest for the version portion of package name. See Fault Management Resource Identifiers for a description of a package FMRI. See Configuring Publishers for information about setting publisher stickiness and search order.

Any preserved configuration files that are part of packages to be updated are installed, saved, or renamed according to the value of the preserve attribute on the file and whether the file has changed. For information about how files are preserved during package updates, see the preserve attribute in the “File Actions” section of the pkg(5) man page.

See Installing a New Package for information about publisher stickiness and search order and about using the -g option.

If you attempt to update a package that is not currently installed, the pkg update operation exits without updating any packages. Use the --ignore-missing option to ignore packages that are not installed and prevent pkg update from failing if some packages to update are not currently installed.

See Chapter 4, Updating or Upgrading an Oracle Solaris Image for information about the special behavior of the pkg update command when no package FMRI or pattern is specified, or if the pattern specified is an asterisk character (*).