Specifying the Version to Install
A simple way to update to a version that is older than the newest version allowed is to specify the package name on the pkg update
command, including a portion of the version string. The following example shows how to specify the version of the pkg:/entire
constraint package to update to Oracle Solaris 11.3 SRU 13, even though a newer version would be allowed:
$ pkg update -nv entire@0.5.11,5.11-0.175.3.13 '*'
Packages to remove: 2
Packages to install: 1
Packages to update: 486
Estimated space available: 48.39 GB
Estimated space to be consumed: 2.50 GB
Create boot environment: Yes
Activate boot environment: Yes
Create backup boot environment: No
Rebuild boot archive: Yes
Changed packages:
solaris
...
entire
0.5.11,5.11-0.175.0.10.0.5.0:20120803T182627Z -> 0.5.11,5.11-0.175.3.13.0.4.0:20160929T175502Z
...
Be sure to use the -nv
options and check the output before performing the actual update. When you perform the actual update, use the --be-name
option to give the new BE a meaningful name.
Some installed packages might not be dependent on any package that is constrained by the entire
constraint package. Those packages will not be updated by updating just the entire
package. You can add those packages by name to the same pkg update
command or specify *
in addition to entire@version
.
Note:
Specifying a version constraint at the command line is not the best way to manage a large number of systems. The best scalable solution is to use a constraint package as described in Using an Oracle Solaris Constraint Package and Installing a Custom Constraint Package.