Home > Articles

  • Print
  • + Share This
This chapter is from the book

Patch Administration

A patch is a collection of files intended to update or fix problems with installed software. For example, a patch might be required to fix a problem with a system command or address a security issue. Because most system and application software are installed as packages, patches are applied against one or more packages. Actually, patches are special packages used to update other packages. Like packages, a collection of patches can be grouped together into a patch cluster.

The ability to obtain and install patches, keep track of installed patches, and occasionally remove patches are key skills of a competent system administrator.

Obtaining Patches and Patch Information

You can obtain patches from Sun Microsystems in several ways. The two most common methods are purchasing a service contract from Sun or downloading the patches yourself from Sun's Web or FTP site.

Sun Service customers have access to an online patch database and an extended set of patches. The patches can be downloaded from Sun's Web site or FTP site. In addition, Sun Service customers receive a CD-ROM of patches every six to eight weeks.

Everyone else can obtain recommended and security patches for supported systems on the Web at http://sunsolve.sun.com or through anonymous FTP from ftp://sunsolve1.sun.com/pubs/patches. Another site for Solaris patches is http://www.ibiblio.org/pub/sun-info/sun-patches.


Sun offers a bimonthly report that summarizes recommended and security patches for each supported system. Like the patches, the information is available at http://sunsolve.sun.com along with other system support information.

Patches are identified with an eight-digit number. The first six digits identify the base patch, and the last two digits identify the revision. For example, patch number 110906-01 is the update for the x86 version of the Solaris 8 find(1) command.

Installing a Patch

You install patches by using the patchadd command. The appropriate type of system configuration must be specified by using a patchadd command-line argument. You might also need to specify a target directory. In addition, you can use a single patchadd command to install more than one patch.

Regardless of the type of system configuration being patched, the patchadd command is typically executed locally on the system where the software being patched resides (the target directory). However, you can install patches remotely over the network if the target directory can be accessed through Network File System (NFS) services.

If the patch is on a CD-ROM, you can install it directly from the CD-ROM. A patch downloaded from the Sun Web or FTP site must reside on a system hard disk. The area where patches are stored before they are installed is referred to as the spool directory.


Although patches have no required spool directory, the most commonly used location is the /var/spool/patch directory. However, you can use any location on the system that has adequate free space.

If a patch was obtained via download, chances are good that it is zipped (compressed) to make it easier and quicker to download. Some patches (mainly for SPARC platforms) are compressed with the gzip(1) command and have filenames ending with the .gz suffix. Others are compressed with the zip(1) command and have filenames ending with the .zip suffix. The zip command is used for both SPARC and Intel x86 platforms. To uncompress or unzip the x86 find patch (110906-01), which is located in the current directory, use the unzip(1) command as shown in the following example:

# unzip 110906-01.zip
Archive: 110906-01.zip
  creating: 110906-01/
 inflating: 110906-01/.diPatch 
  creating: 110906-01/SUNWcsu/
 inflating: 110906-01/SUNWcsu/pkgmap 
 inflating: 110906-01/SUNWcsu/pkginfo 
  creating: 110906-01/SUNWcsu/install/
 inflating: 110906-01/SUNWcsu/install/checkinstall 
 inflating: 110906-01/SUNWcsu/install/copyright 
 inflating: 110906-01/SUNWcsu/install/i.none 
 inflating: 110906-01/SUNWcsu/install/patch_checkinstall 
 inflating: 110906-01/SUNWcsu/install/patch_postinstall 
 inflating: 110906-01/SUNWcsu/install/postinstall 
 inflating: 110906-01/SUNWcsu/install/preinstall 
  creating: 110906-01/SUNWcsu/reloc/
  creating: 110906-01/SUNWcsu/reloc/usr/
  creating: 110906-01/SUNWcsu/reloc/usr/bin/
 inflating: 110906-01/SUNWcsu/reloc/usr/bin/find 
 inflating: 110906-01/README.110906-01 

A subdirectory with the same name as the patch will be created under the current directory, and the unzipped files will be placed in this subdirectory.

You then use the patchadd command to install the patch. Because patches have no default spool directory, you must specify the full pathname to the patch as a command-line argument. The following example shows the installation of the x86 find command patch on a standalone system:

# patchadd 110906-01

Checking installed patches...
Verifying sufficient filesystem capacity (dry run method)...
Installing patch packages...

Patch number 110906-01 has been successfully installed.
See /var/sadm/patch/110906-01/log for details

Patch packages installed:


Note that the patch modified the SUNWcsu package (core Solaris software). The patchadd command is actually a ksh script that calls the pkgadd command to install the patch.

To apply a patch to the bootable root image of a diskless client or AutoClient, use the -R command-line argument and specify the path to the client's root image. For example, applying the Solaris 8 x86 find command patch to a diskless client that uses a root image stored under the /export/root/client directory on the current system requires the following command:

patchadd -R /export/root/client /var/spool/patch/110906-01

To apply a patch to an operating system (OS) service, use the -S command-line argument and specify the service. (See Chapter 13, "The Solaris Network Environment," for information about OS servers.) For example, applying the Solaris 8 find command patch to an x86 Solaris 8 OS service named Solaris_8x86 on the OS server requires the following command:

patchadd -S Solaris_8x86 /var/spool/patch/110906-01

To apply a patch to the mini root of a net install image (the image used to install a system over the network), use the -C command-line argument and specify the pathname to the net install image. For example, applying the Solaris 8 find command patch to an x86 Solaris 8 image on the Solaris_8x86 net install server requires the following command:

patchadd -C /export/Solaris_8x86/Tools/Boot 

Multiple patches can be installed by using the patchadd command with the -M command-line argument and by specifying a directory where all the patches are located and a list of the patch numbers. For example, to install patches 108529-05, 108653-23, and 108876-07, which are all located in the /var/spool/patch directory, you can use the following command:

patchadd -M /var/spool/patch 108529-05 108653-23 108876-07

Instead of listing several patches on the command line, you can create a text file containing a list of patches. Then specify the name of the text file on the command line in place of all the individual patch names.

For example, to install the 108529-05, 108653-23, and 108876-07 patches located in the /var/spool/patch directory, create a text file with the name /var/spool/patch/patchlist that contains the name of the three patches (separated by spaces or returns). Then use the following command to install the patches:

patchadd -M /var/spool/patch /var/spool/patch/patchlist

The -M command-line argument can be used to install multiple patches for client, services, or install servers by specifying the previously described -R, -S, or -C command-line argument. This argument should be specified after the -M patch spool directory and patch names or patch list command-line arguments. See the previous examples of the patchadd command for use of these arguments.

By default, any files that will be changed as a result of the patch's installation are copied to one or more backup directories. If necessary, you can then remove the patch and return the system to its state before the patch was installed. However, if you specify the -d command-line argument on the patchadd command, the files are not backed up, and the patch cannot be removed.

The default backup directories, located under /var/sadm/pkg, are based on the installed package or packages being modified by the patch and the patch number. For example, the x86 find command patch (110906-01) modified the SUNWcsu package. Any files changed by installing this patch will be saved under the /var/sadm/pkg/SUNWcsu/110906-01 directory. You can specify a different backup directory by using the -B command-line argument.

The patchadd command will fail if any of the following occur:

  • A package being patched is not installed or is only partially installed.

  • The patch requires another patch that is not installed.

  • The patch is incompatible with another patch already installed.

  • The current version or a higher version of the patch is already installed.

  • The architecture of the patch and the system do not match.


After you unzip a patch, you can delete the zip file to save space. Likewise, after you install a patch, you can delete the files associated with the patch in the patch spool directory to save space.

Determining Which Patches Are Installed

Two commands can be used to generate a list of installed patches for a standalone system:

  • showrev -p

  • patchadd -p

Both commands generate almost identical lists. The following example illustrates the use of the showrev(1M) command (the output is formatted for readability):

$ showrev -p
Patch: 110906-01
Packages: SUNWcsu
Patch: 108632-06
Requires: 109000-01, 109038-01, 109067-02, 108994-01, 108969-01
Packages: SUNWcsr, SUNWnisr, SUNWncar

When a patch is installed, information about the patch is added to the pkginfo file of each package the patch updates. The pkginfo files are located in subdirectories under the /var/sadm/pkg directory. The showrev and patchadd commands extract and format information from the pkginfo files. In addition to the patch number and packages the patch updates, the commands list any dependency information, such as other required patches or incompatible patches.

You can use the patchadd command to display a list of installed patches for other system configurations by using the -C, -R, and -S command-line arguments, as previously described. For example, to display the patches applied to an OS service named Solaris8x86, you can use the following patchadd command:

patchadd -S solaris8x86 -p

To display a list of patches applied to a particular package, use the pkgparam command. The following example lists the patches applied to the SUNWcsu package:

$ pkgparam SUNWcsu PATCHLIST
108529-01 108826-01 108900-01 108980-04 108986-01 108990-02 
109010-01 109020-01 109028-01 109044-02 109046-02 109092-01 
109138-01 109146-01 109148-01 109150-01 109278-01 108965-02 
108976-02 109004-01 109006-01 109008-01 109012-01 109016-01 
109018-01 109022-01 109024-01 109032-01
109034-01 109036-01 

Removing a Patch

The patchrm command is used to remove or back out a patch by specifying the patch number as a command-line argument. This command also supports the system configurations that the patchadd command supports. You use the same -C, -R, and -S command-line arguments, as previously described. For example, to remove patch 110906-01 from the bootable root image of a diskless client named client5, you can use the following patchrm command:

patchrm -R /export/root/client5 110906-01

Because the default backup directory could have been changed during installation by using the -B command-line argument to the patchadd command, the patchrm command also supports the -B argument. In addition, you can force the patchrm command to remove a patch that has been superseded by another patch by using the -f command-line argument.

You can remove installed patches and return the system to the state it was in before the patch was installed as long as the following conditions are met:

  • The patch is not required by another patch or has been made obsolete by a later patch.

  • The patch was not installed by using patchadd -d, which instructs patchadd not to save a copy of files before they are updated or replaced.

  • + Share This
  • 🔖 Save To Your Account

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information

To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.


Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.


If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information

Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.


This site is not directed to children under the age of 13.


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information

If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information

Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents

California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure

Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact

Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice

We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020