Before you update, perform the following steps:
Review the license. Displaying License Requirements describes how to list packages that require you to accept their license. You might need to specify the --accept option to install or update these packages. Displaying Package Licenses describes how to show the license text.
Read the release notes. Release notes for an Oracle Solaris release are provided on docs.oracle.com. Release notes for an SRU are provided on support.oracle.com.
Check the package versions that are available from your configured publisher origin. See Check Available Versions. You might need to run the pkg refresh command on the publisher or run the pkgrepo refresh command on a particular location of the publisher. If you create your own repository, do not create a partial repository; create a complete repository as described in Creating Package Repositories in Oracle Solaris 11.4.
Use the pkg update command with the -nv options to display the list of packages that will be updated without actually performing the update. See Preview the Update Operation.
When you update, use the --be-name or --require-new-be option to make the changes in a new boot environment, not in the current boot environment, as described in Specify a New Boot Environment.
If the update fails, check Troubleshooting Package Installation and Update.
After you update, verify the installed packages.
$ beadm mount name-of-new-BE /mnt
Make sure you got what you wanted in the update:
$ pkg -R /mnt list -v entire
Verify the packages:
$ pkg -R /mnt verify -v
If errors are reported, use the pkg fix command and then verify that the errors are fixed.
$ pkg -R /mnt fix -v $ pkg -R /mnt verify -v
Remember to unmount the BE.
$ beadm unmount name-of-new-BE
Use the -N option with the pkg history command to see whether release notes are reported in any updated or installed package.
Keep your systems updated with all support updates as described in Applying Support Updates. The "Oracle Solaris Binary and Source Guarantee Program" (Doc ID 1391762.1) ensures that updating across release boundaries is low risk.
The cause of most update errors is an incomplete package repository. See Best Practices for Creating and Using Local IPS Package Repositories in Creating Package Repositories in Oracle Solaris 11.4. The system to be updated must have access to at least the package versions described in Minimal Required Repository in Creating Package Repositories in Oracle Solaris 11.4.
The system must have access to a package repository that provides the packages that are currently installed on the system. For example, if you are updating from Oracle Solaris 11.3 to Oracle Solaris 11.4, the solaris publisher must be configured with access to both the installed Oracle Solaris 11.3 packages and the desired Oracle Solaris 11.4 packages. If packages are installed from another publisher, such as ha-cluster or solarisstudio, those publishers also must be configured with access to currently installed packages as well as desired newer packages.
If you want to update your operating system release, check the available versions of the pkg:/entire constraint package.
Use the following command to determine what version is installed on the system:
$ pkg list entire
Use the following command to determine what versions are available from configured publishers:
$ pkg list -af entire
The output from this command needs to show the currently installed release, the release to which you want to update, and required intermediate releases as described in Minimal Required Repository in Creating Package Repositories in Oracle Solaris 11.4.
To ensure that the currently installed version of pkg:/entire is still available from configured publishers, check for that specific version in specific enabled publisher locations, as shown in the following example:
$ pkgrepo -s /var/share/pkgrepos/solaris list email@example.com
The following command shows that Oracle Solaris 11.3 SRU 22 is installed, and Oracle Solaris 11.3 SRUs 25 and 28 are available from the currently configured solaris publisher. For information about fields in the FMRI, see Fault Management Resource Identifiers.
$ pkg list -af firstname.lastname@example.org NAME (PUBLISHER) VERSION IFO entire 0.5.11-0.175.3.28.0.4.0 --- entire 0.5.11-0.175.3.25.0.3.0 --- entire 0.5.11-0.175.3.22.0.3.0 i--
If none of these versions is what you want, or if some releases required to accomplish the update are missing, then set your solaris publisher origin to a different package repository location or add a location. Use the following command to check the publishers that are configured on the system. The -n option says only show enabled publishers:
$ pkg publisher -n
A single publisher, such as solaris, can have multiple repository locations. If a publisher has more than one repository location configured, use the -F option to check whether all locations are enabled, as shown in Enabling and Disabling Publisher Origins. If some of the package versions required to complete the update are in different package repositories, add those package repository locations to the publisher by using additional –g options with the pkg set-publisher command as shown in Adding and Changing Publisher Origins.
If any publisher repository locations are local to your site, you might need to add more content to those repositories. See Creating Package Repositories in Oracle Solaris 11.4 for instructions.
By default, each package is updated from the publisher that provided the currently installed version. You can control the publisher that provides packages by specifying publisher stickiness and search order. See Adding, Modifying, or Removing Package Publishers.
If one of the publisher repository locations is the Oracle Solaris support repository or other secured repository, make sure the key and certificate are valid.
Make sure the system’s access to a repository is not blocked by a firewall or proxy.
For more information, see Configuring Publishers.
You might find that an Oracle Solaris package repository contains versions of open source software that are newer than the newest version of pkg:/entire in that repository. You might be able to install these newer versions if you unlock the version-lock facets as described in Relaxing Version Constraints Specified by Constraint Packages. You might not be able to uninstall older versions because other software might have a dependency on the older version. In many cases, multiple versions of software are allowed to be installed on the system at the same time. In those cases, the default version is determined by the mediator setting, as described in Specifying a Default Application Implementation. If you require a particular version, specify the full path, not the mediated link, in your script or other software.
For specific versions of FOSS that are available in this release of Oracle Solaris, see Oracle Solaris 11.4 Bundled Software Updates in Freeware Available in Oracle Solaris 11.4.
Use the following options with the pkg update command:
Use the preview option (-n) to see the result of the operation without actually doing the operation. Review this output before you perform an update without the -n option.
Use the verbose option (-v) to see what packages will be updated, removed, and installed and at what versions; what mediators will be changed; what services will be restarted; what editable files will be changed; whether a new BE will be created. If the update does not succeed, the verbose option shows more information to help you diagnose the problem. To get even more information, use -vv.
Specify the result you want. If the update does not succeed, you will get more information to help you diagnose the problem if you specify more of the version of the packages that you are updating.
The following example command shows using these options:
$ pkg update -nv email@example.com
If the update operation does not succeed, consider some of the following steps, depending on the error messages that you received. See also Troubleshooting Package Installation and Update.
Use the pkg freeze command to check whether the system has any packages frozen that could be preventing update.
Use the pkg facet command to check whether the version constraint is unlocked on any package. You might need to re-lock that constraint to accomplish the update you want. Note that the act of setting the version lock can result in a system update.
Check whether an IDR is installed that is constraining the update.
Run pkgrepo verify on the publisher repository locations. Perhaps required dependencies are missing or perhaps permissions are set incorrectly.
Run pkg verify on the system that you are trying to update. Perhaps packaged content was changed on the system in an unsupported way. For example, if someone changed a link that was delivered by an IPS package to be a directory or file, that could prevent the system update.
Software in a non-global zone that is required to be the same release as that software in the parent global zone is updated automatically when you update the global zone. Software in a non-global zone that is not required to be the same release as that software in the parent global zone must be updated separately.
If you request a new BE or if a new BE is required to accomplish the update, you see the following message at the end of the update output:
A clone of currentBE exists and has been updated and activated. On the next boot the Boot Environment newBE will be mounted on '/'. Reboot when ready to switch to this updated BE.
The current BE is not modified. All changes are made in the new BE.
Explicitly specifying a new BE is the safest way to install or update. See Boot Environment Policy Image Properties for information about when BEs are created. You should use the --be-name option to give the new BE a meaningful name.
The new BE is activated so that this new environment is booted by default the next time you boot the system. If you do not want the new BE to be the default on the next reboot, use the --no-be-activate option with the pkg update command. You can change the default boot BE at any time by using the beadm activate command. For more information about boot environment options, see Boot Environment Options.
If you are satisfied with your new BE, you can destroy your old one.