Installing and Updating Packages

The following table shows similarities and differences between the pkg install and pkg update commands.

Table 3-1 pkg install and pkg update Comparison

pkg install pkg update
  • Requires one or more package names as operands.

  • Installs packages that are not currently installed.

  • Updates packages that are already installed.

  • Does not downgrade packages. If you specify an installed package at a lower version, the system does not install that package.

  • Takes zero or more names of packages that are already installed as operands.

  • Updates installed packages.

  • Specifying no package names or specifying '*' updates all packages that are installed in the image.

  • Downgrades installed packages to the version specified in the FMRI.

  • Does not install packages that are not already installed. If you specify a package that is not already installed, the system does not install that package.

See the preserve and overlay attributes of the file action in the pkg(7) man page to understand how files with these attributes are handled during installation and update.

After installing or updating packages, verify installed packages. See Verifying Packages and Fixing Verification Errors.

For information about how a file action with certain attributes is treated when the package that delivers the file is installed or updated, see File Actions in Packaging and Delivering Software With the Image Packaging System in Oracle Solaris 11.4 or the pkg(7) man page.