System Administration Guide: Basic Administration

Chapter 23 Managing Software (Tasks)

This chapter describes how to add, verify, and remove software packages.

For information on the procedures associated with performing software management tasks, see:

Commands for Managing Software Packages

The following table lists the commands to use for adding, removing, and checking the installation of software packages after the Solaris release is installed.

Table 23–1 Tools or Commands for Managing Software Packages

Tool or Command  

Man Page 

Description 

admintool

admintool(1M)

Installs or removes a software package with a graphical tool. 

installer

installer(1M)

Installs or removes a software package with an installer. 

pkgadd

 

pkgadd(1M)

Installs a signed or unsigned software package. 

pkgadm

pkgadm(1M)

Maintains the keys and certificates used to manage signed packages and signed patches. 

pkgchk

pkgchk(1M)

Checks the installation of a software package. 

pkginfo

pkginfo(1)

Lists software package information. 

pkgparam

 

pkgparam(1)

Displays software package parameter values. 

pkgrm

pkgrm(1M)

Removes a software package. 

prodreg

prodreg(1M)

Browse, unregister, and uninstall software in the Solaris Product Registry. 

pkgtrans

pkgtrans(1)

Translates an installable package from one format to another format. The -g option instructs the pkgtrans command to generate and store a signature in the resulting data stream.

Adding Software With the Solaris Web Start Program

This section describes how to use the Solaris Web Start program to add software to a system on which you have installed the Solaris operating system. The Solaris Web Start program installs only the components of the software groups that you skipped when you initially installed the Solaris operating system. You cannot upgrade to another software group after installing or upgrading. For a description of the four software groups, see Solaris 9 12/03 Installation Guide.

How to Install Software With the Solaris Web Start Program


Note –

This procedure assumes that the system is running volume management (vold). If your system is not running volume management, see Chapter 18, Accessing Removable Media (Tasks) for information on accessing removable media without volume management.


  1. Become superuser or assume an equivalent role.

  2. Decide to install from a CD, a DVD, or from the network. Select one of the following:

    • If you are installing from a CD, insert the CD into the CD-ROM drive.

      If you insert the Solaris 9 Languages CD, the Solaris Web Start program starts automatically. Proceed to Step 6.

    • If you are installing from a DVD, insert the DVD into the DVD-ROM drive.

    • If you are installing from the network, locate the net image of the software you want to install.

  3. Change directories to find the Solaris Web Start installer.

    Solaris Web Start installers are located in various directories on the CDs and on the DVD.

    • Solaris 9 Software 1 of 2 CD.

    • Solaris 9 Software 2 of 2 CD.

    • Solaris 9 Documentation CD.

    • Solaris 9 Languages CD. The Solaris Web Start program automatically starts when the CD is inserted.

    For specific information about CD and DVD structures, see “Organization of Solaris 9 Media (Reference)” in Solaris 9 12/03 Installation Guide.

  4. Follow the instructions to install the software.

    • From a file manager, double-click Installer or installer.

    • From the command line, type the following:


       % ./installer [options]

      -nodisplay

      Runs the installer without a GUI. 

      -noconsole

      Runs without any interactive text console device. Use this option with the -nodisplay option when you include the installer command in a UNIX script for installing software.

      Follow the instructions to install the software.

  5. Double-click Installer or installer.

    An Installer window is displayed, followed by the Solaris Web Start dialog box.

  6. Follow the directions on the screen to install the software.

  7. When you have finished adding software, click Exit.

    The Solaris Web Start program exits.

Managing Software With the Solaris Product Registry GUI (Task Map)

The following task map describes the software management tasks that you can do with the Solaris Product Registry.

Task 

Description 

For Instructions 

View installed or uninstalled software with the Product Registry 

You can view installed or uninstalled software with the Product Registry. 

How to View Installed or Uninstalled Software Information With the Product Registry GUI

Install software with the Product Registry 

You can use Product Registry to find software and launch the Solaris Web Start program, which leads you through the installation of that software. 

How to Install Software With the Product Registry GUI

Uninstall software with the Product Registry 

You can uninstall software with the Product Registry. 

How to Uninstall Software With the Product Registry GUI

The Solaris Product Registry is a tool to help you manage installed software. After you have installed the software, Product Registry provides a list of all the installed software by using the Solaris Web Start program 3.0 or the Solaris pkgadd command.

You can use the Solaris Product Registry in a GUI or with a command-line interface (CLI). For more information on how to use the Solaris Product Registry CLI, see Managing Software With the Solaris Product Registry Command-Line Interface (Task Map).

The Solaris Product Registry GUI interface enables you to do the following:

The Solaris Product Registry GUI main window consists of three areas of information:

Figure 23–1 Solaris Product Registry Window

Simple screen capture titled Solaris Product Registry. Shows the Registered Software, Summary, and More Information panes.

How to View Installed or Uninstalled Software Information With the Product Registry GUI

  1. Become superuser or assume an equivalent role.

  2. Start the Product Registry tool.


    # prodreg &
    

    The Solaris Product Registry main window is displayed.

  3. Click the turner control to the left of the System registry directory in the Registered Software box.

    Notice that the turner control changes from pointing to the right to pointing down. You can expand or collapse any item in the Registry, except an item that has a text file icon to its left.

    The Software Installed in Registered Software box always contains the following:

    • The configuration software group that you chose when installing the Solaris release. Software groups that can be displayed include Core, End User System Support, Developer System Support, Entire Distribution, or Entire Distribution Plus OEM Support.

    • Additional system software, which is Solaris products that are not part of the software group you chose.

    • Unclassified software, which is any package that you installed by using the pkgadd command that is not a Solaris product or part of the software group.

  4. Select directories until you find a software application to view.

    The list expands as you open directories.

  5. To view the attributes, select a directory or file.

    The Product Registry displays attribute information in the System Registry box.

    • For software products that were installed with the Solaris Web Start program, the Product Registry contains values for at least the following: Title, Version, Location, and Installed on. Items in an expanded list under a product or software group inherit the version information of the product.

    • If all or part of the product was removed with the pkgrm command, a cautionary icon appears next to the software product's name.

How to Install Software With the Product Registry GUI

You can use Product Registry to find software and launch the Solaris Web Start program, which leads you through the installation of that software.

  1. Become superuser or assume an equivalent role.

  2. Start the Product Registry tool.


    # prodreg
    

    The Solaris Product Registry window is displayed.

  3. Decide if you are installing from a CD, a DVD, or from the network. Select one of the following:

    • If you are installing from a CD, insert the CD into the CD-ROM drive.

    • If you are installing from a DVD, insert the DVD into the DVD-ROM drive.

    • If you are installing from the network, locate the net image of the software that you want to install.

  4. To view the list of installed and registered software, click the turner control.

  5. Click the New Install button at the bottom of the Solaris Product Registry window.

    The Product Registry displays the Select Installer dialog box, which initially points to the /cdrom directory or the directory you are in.

  6. Select directories to find the Solaris Web Start program installer.

    Solaris Web Start installers are located in various directories on the CDs and on the DVD. For specific information about CD and DVD structures, see “Organization of Solaris 9 Media (Reference)” in Solaris 9 12/03 Installation Guide.

    • Solaris 9 Software 1 of 2 and 2 of 2 CD.

    • Solaris 9 Software 2 of 2 CD.

    • Solaris 9 Documentation CD.

    • Solaris 9 Languages CD. The Solaris Web Start program automatically starts when the CD is inserted.

  7. When you find the installer you want, select its name in the Files box.

  8. Click OK.

    The installer you selected is launched.

  9. Follow the directions that are displayed by the installer to install the software.

How to Uninstall Software With the Product Registry GUI

  1. Become superuser or assume an equivalent role.

  2. Start the Product Registry tool.


    # prodreg
    

    The Solaris Product Registry window is displayed.

  3. To view the list of installed and registered software, click the turner control.

  4. Select directories until you find the name of the software that you want to uninstall.

  5. Read the software attributes to make sure that this software is the software that you want to uninstall.

  6. Click the Uninstall software-product-name button at the bottom of the Solaris Product Registry window.

    The software product you selected is uninstalled.

Managing Software With the Solaris Product Registry Command-Line Interface (Task Map)

The following task map describes the software management tasks that you can do with the Solaris Product Registry command-line interface.

Task 

Description 

For Instructions 

View installed or uninstalled software with prodreg

You can view software information with the browse subcommand.

How to View Installed or Uninstalled Software Information (prodreg)

View software attributes with prodreg

You can view specific software attributes with the info subcommand.

How to View Software Attributes (prodreg)

Check dependencies between software components with prodreg

You can view the components that depend on a specific software component with the info subcommand.

How to Check Dependencies Between Software Components (prodreg)

Identify damaged software products with prodreg

If you remove installed software files or packages without using the appropriate uninstaller, you can damage the software on your system. 

How to Identify Damaged Software Products (prodreg)

Uninstall software with prodreg

You can remove software from your system with the uninstall subcommand.

How to Uninstall Software (prodreg)

Uninstall damaged software with prodreg

Uninstalling a damaged software component might fail if the uninstaller program for the software component has been removed from the system. 

How to Uninstall Damaged Software (prodreg)

Reinstall damaged software components with prodreg

If other software depends on a damaged software component, you might want to reinstall the damaged component, rather than uninstall the component and the other dependent software. 

How to Reinstall Damaged Software Components (prodreg)

The prodreg command is the command-line interface (CLI) to the Solaris Product Registry. The prodreg command supports several subcommands that enable you to manage the software on your system.

You can use the prodreg command in a terminal window to perform the following tasks.

For more information on how to manage the Solaris Product Registry by using the command-line interface, see the man page prodreg(1M).

How to View Installed or Uninstalled Software Information (prodreg)

You can view information about software in the Solaris Product Registry in a terminal window by using the browse subcommand to the prodreg command.

  1. Open a terminal window.

  2. Browse the Solaris Product Registry.


    % prodreg browse
        BROWSE # +/-/. UUID                                 # NAME
        ======== ===== ==================================== = ============
        1        -     root                                 1 System 
                                                              Registry
        2         +    a01ee8dd-1dd1-11b2-a3f2-0800209a5b6b 1 Solaris 9 4/03 
                                                              System 
                                                              Software
        3         +    8f64eabf-1dd2-11b2-a3f1-0800209a5b6b 1 Unclassified
                                                              Software

    The browse subcommand to the prodreg command displays the following information about registered software.

    BROWSE #

    When you use the prodreg browse command, the Solaris Product Registry generates a browse number for each registered software component. This number can be used as an argument to either the prodreg browse command or the info subcommand to descend the hierarchy of specific registered components.


    Note –

    Browse numbers might change when you reboot or reinstall your system. Do not store browse numbers in scripts or attempt to reuse them between separate login sessions.


    +/-/.

    This field indicates if a software component has additional software component children registered in the Solaris Product Registry. The following characters are displayed in this field.

    • + indicates that the software component has additional children components that are not currently displayed.

    • - indicates that the software component has additional children components that are currently displayed.

    • . indicates that the software component does not have children components.

    UUID

    This field lists the software's unique identifier in the Solaris Product Registry. 

    #

    This field indicates the instance number of the software component on the system. If the system contains multiple instances of a software component, the Solaris Product Registry assigns a separate instance number to each instance of the component. 

    NAME

    This field lists the localized name of the software. The name of the Solaris operating system in this sample output is the Solaris 9 4/03 release. 

  3. Browse the information for one of the software components that are listed in the Solaris Product Registry.


    % prodreg browse  -m "name"
    
    -mname

    Displays information on the software component with the name name

    If the system contains multiple instances of name software, type the following command to browse the Solaris Product Registry.


    % prodreg browse  -u name-UUID -i instance
    
    -u name-UUID

    Displays information on the name software component with the unique identifier name-UUID

    -i instance

    Displays information on name software component with the instance number instance

  4. Repeat Step 3 for each software component you want to browse.

Example—Viewing Software Information by Component Name (prodreg)

The following example shows how to view software information by referencing the component's name.


% prodreg browse
    BROWSE # +/-/.  UUID                                  #  NAME
    ======== =====  ====================================  =  ============
    1        -      root                                  1  System 
                                                             Registry
    2         +     a01ee8dd-1dd1-11b2-a3f2-0800209a5b6b  1  Solaris 9 4/03 
                                                             System 
                                                             Software
    3         +     8f64eabf-1dd2-11b2-a3f1-0800209a5b6b  1  Unclassified
                                                             Software

% prodreg browse -m "Solaris 9 4/03 System Software"

Example—Viewing Software Information by Component Browse Number (prodreg)

The following example shows how to use the -n option with the prodreg browse command to view software information by referencing the component's browse number.


% prodreg browse
    BROWSE # +/-/.  UUID                                  #  NAME
    ======== =====  ====================================  =  ============
    1        -      root                                  1  System 
                                                             Registry
    2         +     a01ee8dd-1dd1-11b2-a3f2-0800209a5b6b  1  Solaris 9 4/03 
                                                             System 
                                                             Software
    3         +     8f64eabf-1dd2-11b2-a3f1-0800209a5b6b  1  Unclassified
                                                             Software

% prodreg browse -n 2

Example—Viewing Software Information by Component UUID (prodreg)

The following example shows how to use the -u option with the prodreg browse command to view software information by referencing the component's UUID.


% prodreg browse
    BROWSE # +/-/.  UUID                                  #  NAME
    ======== =====  ====================================  =  ============
    1        -      root                                  1  System 
                                                             Registry
    2         +     a01ee8dd-1dd1-11b2-a3f2-0800209a5b6b  1  Solaris 9 4/03 
                                                             System 
                                                             Software
    3         +     8f64eabf-1dd2-11b2-a3f1-0800209a5b6b  1  Unclassified
                                                             Software

% prodreg browse -u a01ee8dd-1dd1-11b2-a3f2-0800209a5b6b

How to View Software Attributes (prodreg)

You can view specific software attributes by using the info subcommand to the prodreg command. The prodreg info command displays a variety of information about registered software, including the following items:

  1. Open a terminal window.

  2. Browse the Solaris Product Registry.


    % prodreg browse
        BROWSE # +/-/. UUID                                 # NAME
        ======== ===== ==================================== = ============
        1        -     root                                 1 System 
                                                              Registry
        2         +    a01ee8dd-1dd1-11b2-a3f2-0800209a5b6b 1 Solaris 9 4/03
                                                              System 
                                                              Software
        3         +    8f64eabf-1dd2-11b2-a3f1-0800209a5b6b 1 Unclassified
                                                              Software
  3. View the attributes for one of the software components that are listed in the Solaris Product Registry.

    You can view the attributes for one of the software components that are listed in the output of the prodreg info command in the following ways.


    % prodreg info  -m "name"
    
    -mname

    Displays the attributes of the software component with the name name

  4. Repeat Step 3 for each software component you want to view.

Example—Viewing Software Attributes by Component Name (prodreg)

The following example shows how to view software attributes by referencing the component's name.


% prodreg browse
    BROWSE # +/-/.  UUID                                  #  NAME
    ======== =====  ====================================  =  ============
    1        -      root                                  1  System 
                                                             Registry
    2         +     a01ee8dd-1dd1-11b2-a3f2-0800209a5b6b  1  Solaris  9 4/03
                                                             System 
                                                             Software
    3         +     8f64eabf-1dd2-11b2-a3f1-0800209a5b6b  1  Unclassified
                                                             Software

% prodreg info -m "Solaris 9 4/03 System Software"

Example—Viewing Software Attributes by Component Browse Number (prodreg)

The following example shows how to use the -n option with the prodreg info command to view software attributes by referencing the component's browse number.


% prodreg browse
    BROWSE # +/-/.  UUID                                  #  NAME
    ======== =====  ====================================  =  ============
    1        -      root                                  1  System 
                                                             Registry
    2         +     a01ee8dd-1dd1-11b2-a3f2-0800209a5b6b  1  Solaris 9 4/03 
                                                             System 
                                                             Software
    3         +     8f64eabf-1dd2-11b2-a3f1-0800209a5b6b  1  Unclassified
                                                             Software

% prodreg info -n 2

Example—Viewing Software Attributes by Component UUID (prodreg)

The following example shows how to use the -u option with the prodreg info command to view software attributes by referencing the component's UUID.


% prodreg browse
    BROWSE # +/-/.  UUID                                  #  NAME
    ======== =====  ====================================  =  ============
    1        -      root                                  1  System 
                                                             Registry
    2         +     a01ee8dd-1dd1-11b2-a3f2-0800209a5b6b  1  Solaris 9 4/03 
                                                             System 
                                                             Software
    3         +     8f64eabf-1dd2-11b2-a3f1-0800209a5b6b  1  Unclassified
                                                             Software

% prodreg info -u a01ee8dd-1dd1-11b2-a3f2-0800209a5b6b

How to Check Dependencies Between Software Components (prodreg)

You can use the prodreg info command to view the components that depend on a specific software component. You might want to check dependencies between software products before you uninstall specific components.

  1. Open a terminal window.

  2. Browse the Solaris Product Registry.


    % prodreg browse
     BROWSE # +/-/.  UUID                                  #  NAME
     ======== =====  ====================================  =  ============
     1        -      root                                  1  System
                                                              Registry
     2         +     a01ee8dd-1dd1-11b2-a3f2-0800209a5b6b  1  Solaris 9 4/03 
                                                              System 
                                                              Software
     3         +     8f64eabf-1dd2-11b2-a3f1-0800209a5b6b  1  Unclassified
                                                              Software

    Repeat the prodreg browse command until the software component you want to check is displayed in the Solaris Product Registry. See How to View Installed or Uninstalled Software Information (prodreg) for more information on browsing the Solaris Product Registry with the prodreg browse command.

  3. View the dependencies of a specific software component.


    % prodreg info -m "name" -a "Dependent Components"
    
    -mname

    Displays the attributes of the software component with the name name.

    -a “Dependent Components”

    Displays the components that depend on name software by displaying the values of the Dependent Components attribute.

    This command outputs a list of the software components that depend on name software.

Example—Viewing Components That Depend on Other Software Products (prodreg)

The following example shows how to view the components that depend on the software product that is named ExampleSoft.


% prodreg -m "ExampleSoft" -a "Dependent Components"
Dependent Components:
Name                         UUID                                  #
---------------------------  ------------------------------------  -
ExampleSoftA                 7f49ecvb-1ii2-11b2-a3f1-0800119u7e8e  1

How to Identify Damaged Software Products (prodreg)

If you remove installed software files or packages without using the appropriate uninstaller, you can damage the software on your system. If software is damaged, the software might not function properly. You can use the info subcommand to the prodreg command to help you determine if a software product is damaged.

  1. View the Solaris Product Registry information on the software you want to check.


    % prodreg browse -m name
    BROWSE #  +/-/.  UUID                                  #  NAME
    ========  =====  ====================================  =  ============
    1         -      root                                  1  System 
                                                              Registry
    2          +     a01ee8dd-1dd1-11b2-a3f2-0800209a5b6b  1  Solaris 9 8/03
                                                              System
                                                              Software
    3          +     8f64eabf-1dd2-11b2-a3f1-0800209a5b6b  1  Unclassified 
                                                              Software
    4          -     name-UUID                              1  name
    233         .    component-a-pkg                           1  component-a
    234         .    component-b-pkg                           1
    -mname

    Displays information on the software component with the name name.

    name-UUID

    Specifies the UUID of the name software component.

    component-a-pkg

    Specifies the package name of the component-a component that depends on name software.

    component-a

    Specifies the name of a component that depends on name software.

    component-b-pkg

    Specifies the package name of the component-b component that depends on name software.

    In the previous sample output, the component-b-pkg entry does not have an associated name in the Name column. If a software component name is not displayed in the Solaris Product Registry, the component might be damaged.

  2. Verify that the software component is damaged.


    % prodreg info -u name-UUID -i 1 -d
    isDamaged=TRUE
    -u name-UUID

    Displays information on the name software component.

    -i 1

    Displays information on the first instance of the name software component.

    -d

    Displays the value of the isDamaged attribute of the name software component.

    The isDamaged=TRUE output indicates that the name software component is damaged.

  3. Identify the packages that form the name-UUID software component.


    % prodreg info -u name-UUID -i 1 -a PKGS
    pkgs:
    component-a-pkg component-b-pkg
    
  4. Verify that these packages are installed on the system.


    % pkginfo component-a-pkg
    application component-a-pkg component-a
    
    % pkginfo component-b-pkg
    ERROR: information on "component-b-pkg" was not found

    The error message output of the pkginfo component-b-pkg command indicates that the component-b-pkg package has been removed from the system. The name software component might not work without the component-b-pkg package.

Example—Identifying Damaged Software Components (prodreg)

The following example shows how to determine if the ExampleSoft software component is damaged.


% prodreg browse -m Examplesoft
BROWSE #  +/-/.  UUID                                  #  NAME
========  =====  ====================================  =  ============
1         -      root                                  1  System 
                                                          Registry
2          +     a01ee8dd-1dd1-11b2-a3f2-0800209a5b6b  1   Solaris 9 8/03
                                                          System
                                                          Software
3          +     8f64eabf-1dd2-11b2-a3f1-0800209a5b6b  1  Unclassified 
                                                          Software
4          -     95842091-725a-8501-ef29-0472985982be  1  ExampleSoft
233         .    90209809-9785-b89e-c821-0472985982be  1  Example Doc
234         .    EXSOzzt                               1
235         .    EXSOblob                              1  Example Data

The ExampleSoft child component EXSOzzt does not have an entry in the NAME column of the Solaris Product Registry. The ExampleSoft software might be damaged. Use the prodreg info command with the -u, -i, and -d options to determine if the ExampleSoft software is damaged.


% prodreg info -u 95842091-725a-8501-ef29-0472985982be -i 1 -d 
isDamaged=TRUE

The output of the previous command indicates that the ExampleSoft software is damaged. Use the -a PKGS option to the prodreg info command to identify the ExampleSoft software packages.


% prodreg info 
     -u 95842091-725a-8501-ef29-0472985982be 
     -i 1 -a PKGS 
pkgs: 
EXSOzzt EXSOblob

Use the pkginfo command to verify that the EXSOzzt and EXSOblob packages are installed on the system.


% pkginfo EXSOzzt 
ERROR: information for "EXSOzzt" was not found 

% pkginfo EXSOblob
application EXSOblob       Example Data

The output of the pkginfo command indicates that the EXSOzzt package is not installed on the system.

How to Uninstall Software (prodreg)

You can use the uninstall subcommand to the prodreg command to remove software from your system. When you uninstall software with the prodreg uninstall command, you remove a specified software and all the child components associated with that software. Before you remove software, verify that other software does not depend on the software you want to uninstall. See How to Check Dependencies Between Software Components (prodreg) for instructions on how to check software dependencies.

After you uninstall a software component, you can remove the software and all the child components of that software from the Solaris Product Registry by using the prodreg unregister -r command.

  1. Become superuser or assume an equivalent role.

  2. View the information on the software you want to uninstall.


    # prodreg browse -u name-UUID
    BROWSE #  +/-/.  UUID                                  #  NAME
    ========  =====  ====================================  =  ============
    1         -      root                                  1  System 
                                                              Registry
    2          +     a01ee8dd-1dd1-11b2-a3f2-0800209a5b6b  1   Solaris 9 8/03
                                                              System
                                                              Software
    3          +     8f64eabf-1dd2-11b2-a3f1-0800209a5b6b  1  Unclassified 
                                                              Software
    1423       -     name-UUID                              1  name
    1436        .    component-a-UUID                          1  component-a
    1437        -    component-b-UUID                          1  component-b
    1462         .   component-c-UUID                          1  component-c
    
    -u name-UUID

    Displays information on the software component with the unique identifier name-UUID.

    name

    Specifies the name of the software component you want to uninstall with the unique identifier name-UUID.

    . component-a-UUID

    Specifies the unique identifier of the component-a software component that is required by name software.

    component-a

    Specifies the name of a component that is required by name software.

    - component-b-UUID

    Specifies the unique identifier of the component-b component that is required by name software. The - symbol indicates that component-b requires an additional software component.

    component-b

    Specifies the name of a software component that is required by name software.

    . component-c-UUID

    Specifies the unique identifier of the component-b software component that is required by component-b software.

    component-c

    Specifies the name of a software component that is required by component-b software.

  3. Uninstall the software.


    # prodreg uninstall -u name-UUID 
    
  4. Check the dependencies for the software that you want to uninstall.


    # prodreg info -u name-UUID
    Title: name
    .
    .
    .
    Child Components:
    Name                        UUID                                  #
    --------------------------  ------------------------------------  -
    component-a                    component-a-UUID                        1
    component-b                    component-b-UUID                        1
    
    Required Components:
    Name                        UUID                                  #
    --------------------------  ------------------------------------  -
    component-a                    component-a-UUID                        1
    component-b                    component-b-UUID                        1

    Check the following information in the output of the prodreg info command.

    • Child Components – Lists the software components that are associated with the name software component. When you unregister the name software, you also unregister the child components of name software. If the output of the previous prodreg info command lists any child components, verify that you want to unregister these child components.

    • Required Components – Lists the software components that are required by the name software component. Software components might require other components that are not child components. When you uninstall and unregister a component, only child components are unregistered and uninstalled.

    • Dependent Components – Lists the components that require name software to run. When you unregister the name software, you also unregister the dependent components of name software. If the output of the previous prodreg info command lists any dependent components, verify that you want to unregister these dependent components.

    In the previous sample output, name software does not have any dependent components.

  5. Check the dependencies of name software's child components.


    # prodreg info -u component-a-UUID -i 1 -a "Dependent Components"
    Dependent Components:
    Name                         UUID                                  #
    ---------------------------  ------------------------------------  -
    name                          name-UUID                             1
    
    # prodreg info -u component-b-UUID -i 1 -a "Dependent Components"
    Dependent Components:
    Name                         UUID                                  #
    ---------------------------  ------------------------------------  -
    name                          name-UUID                             1
    
    # prodreg info -u component-c-UUID -i 1 -a "Dependent Components"
    Dependent Components:
    Name                         UUID                                  #
    ---------------------------  ------------------------------------  -
    component-b                     component-b-UUID                        1

    In the previous sample output, no other software depends on the child components of name software.

  6. Unregister the software and child components.


    # prodreg unregister -r -u name-UUID -i 1
    
    -r

    Recursively unregisters software with the unique identifier name-UUID and all the child components of this software.

    -u name-UUID

    Specifies the unique identifier of the software you want to unregister.

    -i 1

    Specifies the instance of the software you want to unregister.

Example—Uninstalling Software Components (prodreg)

The following example shows how to uninstall ExampleSoft software and all the child components of ExampleSoft software.


# prodreg browse -m "ExampleSoft"
BROWSE #  +/-/.  UUID                                  #  NAME
========  =====  ====================================  =  ============
1         -      root                                  1  System 
                                                          Registry
2          +     a01ee8dd-1dd1-11b2-a3f2-0800209a5b6b  1  Solaris 9 8/03
                                                          System
                                                          Software
3          +     8f64eabf-1dd2-11b2-a3f1-0800209a5b6b  1  Unclassified 
                                                          Software
1423       -     95842091-725a-8501-ef29-0472985982be  1  ExampleSoft
1436        .    90209809-9785-b89e-c821-0472985982be  1  Example Doc
1437        -    EXSOzzt                               1  Example Data
1462         .   EXSOblob                              1  Example Data

# prodreg uninstall -u 95842091-725a-8501-ef29-0472985982be -i 1

# prodreg info -u 95842091-725a-8501-ef29-0472985982be
Title: ExampleSoft Software
.
.
.
Child Components:
Name                        UUID                                  #
--------------------------  ------------------------------------  -
Example Doc                 90209809-9785-b89e-c821-0472985982be  1
Example Data                EXSOzzt                               1

Required Components:
Name                        UUID                                  #
--------------------------  ------------------------------------  -
Example Doc                 90209809-9785-b89e-c821-0472985982be  1
Example Data                EXSOzzt                               1

# prodreg info -u 90209809-9785-b89e-c821-0472985982be -i 1 
    -a "Dependent Components"
Dependent Components:
Name                         UUID                                  #
---------------------------  ------------------------------------  -
ExampleSoft                  95842091-725a-8501-ef29-0472985982be  1

# prodreg info -u EXSOzzt -i 1 -a "Dependent Components"
Dependent Components:
Name                         UUID                                  #
---------------------------  ------------------------------------  -
ExampleSoft                  95842091-725a-8501-ef29-0472985982be  1

# prodreg info -u EXSOblob -i 1 -a "Dependent Components"
Dependent Components:
Name                         UUID                                  #
---------------------------  ------------------------------------  -
Example Data                 EXSOzzt                               1

# prodreg unregister -r -u 95842091-725a-8501-ef29-0472985982be -i 1

How to Uninstall Damaged Software (prodreg)

If you try to uninstall a damaged software component by using the prodreg uninstall command, the command might fail. This failure can occur if the uninstaller program for the software component has been removed from the system.

Follow these steps to uninstall a software component with no associated uninstaller program on the system.

  1. Become superuser or assume an equivalent role.

  2. View the information on the software you want to uninstall.


    # prodreg browse -m "name"
    BROWSE #  +/-/.  UUID                                  #  NAME
    ========  =====  ====================================  =  ============
    1         -      root                                  1  System 
                                                              Registry
    2          +     a01ee8dd-1dd1-11b2-a3f2-0800209a5b6b  1   Solaris 9 8/03 
                                                              System
                                                              Software
    3          +     8f64eabf-1dd2-11b2-a3f1-0800209a5b6b  1  Unclassified 
                                                              Software
    4           -    UUID                                  1  name
    1436        .    component-a-UUID                         1  component-a
    1437        .    component-b-UUID                         1  
    -mname

    Displays information on the name software component you want to uninstall.

    UUID

    Specifies the UUID of the software component you want to uninstall.

    . component-a-UUID

    Specifies the UUID of the component-a software component.

    component-a

    Specifies the name of a child software component of name software.

    . component-b-UUID

    Specifies the UUID of a child software component of name software.

    The component-b-UUID entry does not have an associated component name. The missing name value might indicate that this component is damaged.

  3. Uninstall the software.


    # prodreg uninstall -u UUID -i 1
    The install program requested could not be found
    -u UUID

    Specifies the UUID of the software component you want to uninstall.

    -i 1

    Specifies the instance of the software you want to uninstall.

    The error message indicates that the uninstaller program is not on the system.

  4. Identify the uninstaller program for the software component.


    # prodreg info -m "name" -a uninstallprogram
    uninstallprogram: /usr/bin/java -mx64m -classpath 
    uninstaller-location uninstall_name
    
    -mname

    Displays information on the name software component.

    -a uninstallprogram

    Displays information on the uninstaller program that is associated with the name software component.

    uninstaller-location

    Specifies the registered location of the uninstaller program for the name software component.

  5. Determine if the uninstaller is in the registered location.


    # ls uninstaller-location
    uninstaller-location:
    No such file or directory

    The output of the ls command indicates that the uninstaller program is not in the registered location.

  6. Remove the software from the system.

    You can remove the software in one of the following ways.

    • If you have a system backup available, follow these steps.

      1. Load the uninstaller program from the backup.

      2. Run the uninstaller program from a shell command-line interface such as a terminal window.

    • If you do not have access to the uninstaller program on a backup, follow these steps.

      1. Unregister the software component.


        # prodreg unregister -u UUID -i 1
        
      2. Remove any remaining registered components that are required by the software you want to remove.


        # pkgrm component-a-UUID
        

Example—Uninstalling Damaged Software (prodreg)

The following example shows how to uninstall the damaged ExampleSoft software. In this example, the uninstaller program is not readily available on a system backup.


# prodreg browse -m Examplesoft
BROWSE #  +/-/.  UUID                                  #  NAME
========  =====  ====================================  =  ============
1         -      root                                  1  System 
                                                          Registry
2          +     a01ee8dd-1dd1-11b2-a3f2-0800209a5b6b  1   Solaris 9 8/03 
                                                          System
                                                          Software
3          +     8f64eabf-1dd2-11b2-a3f1-0800209a5b6b  1  Unclassified 
                                                          Software
4          -     95842091-725a-8501-ef29-0472985982be  1  ExampleSoft
233         .    90209809-9785-b89e-c821-0472985982be  1  Example Doc
234         .    EXSOzzt                               1
235         .    EXSOblob                              1  Example Data

# prodreg uninstall -u 95842091-725a-8501-ef29-0472985982be -i 1
The install program requested could not be found

# prodreg info -m "ExampleSoft" -a uninstallprogram
uninstallprogram: /usr/bin/java -mx64m -classpath 
/var/sadm/prod/org.example.ExampleSoft/987573587 uninstall_ExampleSoft

# ls /var/sadm/prod/org.example.ExampleSoft/987573587
/var/sadm/prod/org.example.ExampleSoft/987573587:
No such file or directory

# prodreg unregister -u 95842091-725a-8501-ef29-0472985982be -i 1

# pkgrm EXSOblob

How to Reinstall Damaged Software Components (prodreg)

If other software depends on a damaged software component, you might want to reinstall the damaged component, rather than uninstall the component and the other dependent software. You can use the -f option with the prodreg unregister to perform a forced unregister of the damaged component, and then reinstall the component.

  1. Become superuser or assume an equivalent role.

  2. View the information on the software you want to reinstall.


    # prodreg browse -m "name"
    BROWSE #  +/-/.  UUID                                  #  NAME
    ========  =====  ====================================  =  ============
    1         -      root                                  1  System 
                                                              Registry
    2          +     a01ee8dd-1dd1-11b2-a3f2-0800209a5b6b  1   Solaris 9 8/03 
                                                              System
                                                              Software
    3          +     8f64eabf-1dd2-11b2-a3f1-0800209a5b6b  1  Unclassified 
                                                              Software
    4           .    UUID                                  1  name
    
    -mname

    Displays information on the name software component you want to reinstall.

    UUID

    Specifies the UUID of the software component you want to reinstall.

  3. Identify the software that depends on the software you want to reinstall.


    # prodreg info -m "name" -a "Dependent Components"
    Dependent Components:
    Name                         UUID                                  #
    ---------------------------  ------------------------------------  -
    component-a                     component-a-UUID                        1
    -mname

    Specifies the name of the software component you want to reinstall.

    -a “Dependent Components”

    Displays the components that depend on name software.

    component-a

    Specifies the name of a software component that depends on name software.

    component-a-UUID

    Specifies the UUID of the component-a software component.

    The component-a software component depends on the software you want to reinstall. To reinstall name software and not unregister component-a, you must perform a forced unregister of name software, then reinstall name software.

  4. Unregister only the software component you want to reinstall.


    # prodreg unregister -f -u UUID
     
    
  5. Reinstall the software component.


    # /usr/bin/java -cp /usr/installers/installer
    
    installer

    Specifies the name of the installer program for name software.

Example—Reinstalling Damaged Software Components (prodreg)

The following example shows how to reinstall the damaged software component ComponentSoft without unregistering or uninstalling the dependent component ExampleSoft.


# prodreg browse -m "ComponentSoft"
BROWSE #  +/-/.  UUID                                  #  NAME
========  =====  ====================================  =  ============
1         -      root                                  1  System 
                                                          Registry
2          +     a01ee8dd-1dd1-11b2-a3f2-0800209a5b6b  1   Solaris 9 8/03
                                                          System
                                                          Software
3          +     8f64eabf-1dd2-11b2-a3f1-0800209a5b6b  1  Unclassified 
                                                          Software
4           .    86758449-554a-6531-fe90-4352678362fe  1  ComponentSoft

# prodreg info -m "ComponentSoft" -a "Dependent Components"
Dependent Components:
Name                         UUID                                  #
---------------------------  ------------------------------------  -
ExampleSoft                  95842091-725a-8501-ef29-0472985982be  1

# prodreg unregister -f -u 86758449-554a-6531-fe90-4352678362fe -i 1

# /usr/bin/java -cp /usr/installers/org.example.componentsoft

Adding and Removing Signed Packages (Task Map)

The following task map describes the tasks for adding and removing signed packages.

Task 

Description 

For Instructions 

Import a certificate 

Import a trusted certificate with the pkgadm addcert command.

How to Import a Trusted Certificate into the Package Keystore (pkgadm addcert)

(Optional) Display the details of one or more certificates 

Display the details of a certificate with the pkgadm listcert command.

How to Display Certificate Information (pkgadm listcert)

(Optional) Remove a certificate 

Remove a certificate with the pkgadm removecert command.

How to Remove a Certificate (pkgadm removecert)

(Optional) Set up a proxy server 

Specify a proxy server if your system is behind a firewall with a proxy. 

How to Set Up a Proxy Server (pkgadd)

Add a signed package 

After the root certificate is imported, you can add a signed package with the pkgadd command.

How to Add a Signed Package (pkgadd)

(Optional) Remove a signed package 

Removing a signed package is identical to removing an unsigned package. 

How to Remove Software Packages (pkgrm)

How to Import a Trusted Certificate into the Package Keystore (pkgadm addcert)

  1. Become superuser or assume an equivalent role.

  2. Verify that the Root CA certificate exists in the Java keystore.


    # keytool -storepass storepass -list -keystore certfile
    

    keytool

    Manages a Java keystore (database) of private keys and their associated X.509 certificate chains that authenticate the corresponding public keys. Also manages certificates from trusted entities. For more information on the keytool command, see keytool-Key and Certificate Management Tool.

    -storepass storepass

    Specifies the password that protects the integrity of the Java keystore. 

    -list

    By default, prints the MD5 fingerprint of a certificate. 

    -keystore certfile

    Specifies the name and location of the persistent Java keystore file. 

  3. Export the Root CA certificate from the Java keystore to a temporary file.


    # keytool -export -storepass storepass -alias gtecybertrustca -keystore 
    gtecybertrustca -keystore /usr/j2se/jre/lib/security/cacerts -file filename
    

    -export

    Exports the trusted certificate. 

    -storepass storepass

    Specifies the password that protects the integrity of the Java keystore. 

    -alias gtecybertrustca

    Identifies the alias of the trusted certificate. 

    -keystore certfile

    Specifies the name and location of the keystore file. 

    -file filename

    Identifies the file to hold the exported certificate. 

  4. Import a trusted certificate to the package keystore.


    # pkgadm addcert -t -f format certfile
    

    -t

    Indicates that the certificate is a trusted CA certificate. The command output includes the details of the certificate, which the user is asked to verify. 

    -f format

    Specifies the format of the certificates or private key. When importing a certificate, it must be encoded using either the PEM (pem) or binary DER (der) format.

    certfile

    Specifies the file that contains the certificate. 

    For more information, see the pkgadm man page.

  5. Remove the temporary file.

Example—Importing a Trusted Certificate

The following example shows how to import a trusted certificate. In this example, Sun's Root CA certificate is imported from the Java keystore into the package keystore with the keytool command.


# keytool -export -storepass changeit -alias gtecybertrustca -keystore 
gtecybertrustca -keystore /usr/j2se/jre/lib/security/cacerts -file 
/tmp/root.crt
Certificate stored in file </tmp/root.crt>
# pkgadm addcert -t -f der /tmp/root.crt
Enter Keystore Password: storepass
      Keystore Alias: GTE CyberTrust Root
         Common Name: GTE CyberTrust Root
    Certificate Type: Trusted Certificate
  Issuer Common Name: GTE CyberTrust Root
      Validity Dates:<Feb 23 23:01:00 1996 GMT>-<Feb 23 23:59:00 2006 GMT>
     MD5 Fingerprint: C4:D7:F0:B2:A3:C5:7D:61:67:F0:04:CD:43:D3:BA:58
    SHA1 Fingerprint: 90:DE:DE:9E:4C:4E:9F:6F:D8:86:17:57:9D:D3:91:BC...
Trusting certificate <GTE CyberTrust Root>
Type a Keystore protection Password.
Press ENTER for no protection password (not recommended): xxx
For Verification: Type a Keystore protection Password.
Press ENTER for no protection password (not recommended): xxx
Certificate(s) from </tmp/root.crt> are now trusted
# rm /tmp/root.crt

How to Display Certificate Information (pkgadm listcert)

  1. Become superuser or assume an equivalent role.

  2. Display the contents of the package keystore.


    # pkgadm listcert
    

Example—Displaying Certificate Information (pkgadm listcert)

The following example shows how to display the details of a locally stored certificate.


# pkgadm listcert -P pass:storepass
    Keystore Alias: GTE CyberTrust Root
       Common Name: GTE CyberTrust Root
  Certificate Type: Trusted Certificate
Issuer Common Name: GTE CyberTrust Root
    Validity Dates: <Feb 23 23:01:00 1996 GMT> - <Feb 23 23:59:00 2006 GMT>
   MD5 Fingerprint: C4:D7:F0:B2:A3:C5:7D:61:67:F0:04:CD:43:D3:BA:58
  SHA1 Fingerprint: 90:DE:DE:9E:4C:4E:9F:6F:D8:86:17:57:9D:D3:91:BC...

How to Remove a Certificate (pkgadm removecert)

  1. Become superuser or assume an equivalent role.

  2. Remove the trusted certificate from the package keystore.


    # pkgadm removecert -n "certfile"

    The -ncertfile” option specifies the alias of the user certificate/key pair or the alias of the trusted certificate.


    Note –

    View the alias names for certificates with the pkgadm listcert command.


Example—Removing a Certificate (pkgadm removecert)

The following example shows how to remove a certificate.


# pkgadm listcert
Enter Keystore Password: storepass
      Keystore Alias: GTE CyberTrust Root
         Common Name: GTE CyberTrust Root
    Certificate Type: Trusted Certificate
  Issuer Common Name: GTE CyberTrust Root
      Validity Dates:<Feb 23 23:01:00 1996 GMT>-<Feb 23 23:59:00 2006 GMT>
     MD5 Fingerprint: C4:D7:F0:B2:A3:C5:7D:61:67:F0:04:CD:43:D3:BA:58
    SHA1 Fingerprint: 90:DE:DE:9E:4C:4E:9F:6F:D8:86:17:57:9D:D3:91:BC...
# pkgadm removecert -n "GTE CyberTrust Root"
Enter Keystore Password: storepass
Successfully removed Certificate(s) with alias <GTE CyberTrust Root>

How to Set Up a Proxy Server (pkgadd)

If your system is behind a firewall with a proxy, you will need to set up a proxy server before you can add a package from an HTTP server with the pkgadd command.

  1. Become superuser or assume an equivalent role.

  2. Select one of the following methods to specify a proxy server.

    1. Specify the proxy server by using the http_proxy, HTTPPROXY, or HTTPPROXYPORT environment variable.

      For example:


      # setenv http_proxy http://mycache.domain:8080
      

      Or, specify one of the following:


      # setenv HTTPPROXY mycache.domain
      # setenv HTTPPROXYPORT 8080
      
    2. Specify the proxy server on the pkgadd command line.

      For example:


      # pkgadd -x mycache.domain:8080 -d http://myserver.com/pkg SUNWpkg
      
    3. Create a admin file that includes proxy server information.

      For example:


      # cat /tmp/admin
      mail=
      instance=unique
      partial=ask
      runlevel=ask
      idepend=ask
      rdepend=ask
      space=ask
      setuid=ask
      conflict=ask
      action=ask
      networktimeout=60
      networkretries=3
      authentication=quit
      keystore=/var/sadm/security
      basedir=default
      proxy=mycache.domain:8080
      

      Then, identify the admin file with the pkgadd -a command. For example:


      # pkgadd -a /tmp/admin -d http://myserver.com/pkg SUNWpkg
      

How to Add a Signed Package (pkgadd)

This procedure assumes that you have imported Sun's Root CA certificate. For more information, see How to Import a Trusted Certificate into the Package Keystore (pkgadm addcert).

For information about setting up a proxy server, see How to Set Up a Proxy Server (pkgadd).

  1. Become superuser or assume an equivalent role.

  2. Add a signed package.


    # pkgadd -d /pathname/package-name
    

    The -d device-name option specifies the device from which the package is installed. The device can be a directory, tape, diskette, or removable disk. The device can also be a data stream created by the pkgtrans command.

Examples—Adding a Signed Package (pkgadd)

The following example shows how to add a signed package that has already been downloaded.


# # pkgadd -d /tmp/signed_pppd
The following packages are available:
  1  SUNWpppd     Solaris PPP Device Drivers
                  (sparc) 11.10.0,REV=2003.05.08.12.24

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]: all
Enter keystore password:
## Verifying signature for signer <User Cert 0>
.
.
.

The following example shows how to install a signed package using an HTTP URL as the device name. The URL must point to a stream-formatted package.


# pkgadd -d http://install/signed-video.pkg

## Downloading...
..............25%..............50%..............75%..............100%
## Download Complete
.
.
.

Managing Software Packages With Package Commands (Task Map)

The following task map describes the software management tasks that you can do with the package commands for both signed and unsigned packages.

Task 

Description 

For Instructions 

Add a software packages to the local system 

You can add software packages to the local system with the pkgadd command.

How to Add Software Packages (pkgadd)

Add software packages to a spool directory 

You can add software packages to a spool directory without actually installing the software. 

Adding a Software Package to a Spool Directory

List information about all installed software packages 

You can list information about installed packages with the pkginfo command.

How to List Information About All Installed Packages (pkginfo)

Check the integrity of installed software packages 

You can verify the integrity of install software packages with the pkgchk command.

How to Check the Integrity of Installed Software Packages (pkgchk)

Remove software packages 

You can remove unneeded software packages with the pkgrm command.

How to Remove Software Packages (pkgrm)

How to Add Software Packages (pkgadd)

  1. Become superuser or assume an equivalent role.

  2. Remove any already installed packages with the same names as the ones you are adding.

    This step ensures that the system keeps a proper record of software that has been added and removed. There might be times when you want to maintain multiple versions of the same application on the system. For strategies on maintaining multiple software copies, see Guidelines for Removing Packages (pkgrm), and for task information, see How to Remove Software Packages (pkgrm).

  3. Add a software package to the system.


    # pkgadd -a admin-file -d device-name pkgid ... 

    -a admin-file

    (Optional) Specifies an administration file that the pkgadd command should consult during the installation. For details about using an administration file, see Using an Administration File in the previous chapter.

    -d device-name

    Specifies the absolute path to the software packages. device-name can be the path to a device, a directory, or a spool directory. If you do not specify the path where the package resides, the pkgadd command checks the default spool directory (/var/spool/pkg). If the package is not there, the package installation fails.

    pkgid

    (Optional) Is the name of one or more packages, separated by spaces, to be installed. If omitted, the pkgadd command installs all available packages.

    If the pkgadd command encounters a problem during installation of the package, it displays a message related to the problem, followed by this prompt:


    Do you want to continue with this installation?

    Respond with yes, no, or quit. If more than one package has been specified, type no to stop the installation of the package being installed. The pkgadd command continues to install the other packages. Type quit to stop the installation.

  4. Verify that the package has been installed successfully.


    # pkgchk -v pkgid
    

    If no errors occur, a list of installed files is returned. Otherwise, the pkgchk command reports the error.

Example—Adding Software Packages From a Mounted CD

The following example shows how install the SUNWpl5u package from a mounted Solaris 9 CD. The example also shows how to verify that the package files were installed properly.


# pkgadd -d /cdrom/cdrom0/s0/Solaris_9/Product SUNWpl5u
	.
	.
	.
Installation of <SUNWpl5u> was successful.
# pkgchk -v SUNWpl5u
/usr
/usr/bin
/usr/bin/perl
/usr/perl5
/usr/perl5/5.00503
.
.
.

Example—Installing Software Packages From a Remote Package Server

If the packages you want to install are available from a remote system, you can manually mount the directory that contains the packages (in package format) and install packages on the local system.

The following example shows how to install software packages from a remote system. In this example, assume that the remote system named package-server has software packages in the /latest-packages directory. The mount command mounts the packages locally on /mnt, and the pkgadd command installs the SUNWpl5u package.


# mount -F nfs -o ro package-server:/latest-packages /mnt
# pkgadd -d /mnt SUNWpl5u
	.
	.
	.
Installation of <SUNWpl5u> was successful.

If the automounter is running at your site, you do not need to mount the remote package server manually. Instead, use the automounter path, in this case, /net/package-server/latest-packages, as the argument to the -d option.


# pkgadd -d /net/package-server/latest-packages SUNWpl5u
	.
	.
	.
Installation of <SUNWpl5u> was successful.

The following example is similar to the previous example, except that it uses the -a option and specifies an administration file named noask-pkgadd, which is illustrated in Avoiding User Interaction When Adding Packages (pkgadd). In this example, assume that the noask-pkgadd administration file is in the default location, /var/sadm/install/admin.


# pkgadd -a noask-pkgadd -d /net/package-server/latest-packages SUNWpl5u
	.
	.
	.
Installation of <SUNWpl5u> was successful.

Example —Installing Software Packages From an HTTP URL

The following example shows how to install a package using an HTTP URL as the device name. The URL must point to a stream-formatted package.


# pkgadd -d http://install/xf86-4.3.0-video.pkg

## Downloading...
..............25%..............50%..............75%..............100%
## Download Complete


The following packages are available:
  1  SUNWxf86r     XFree86 Driver Porting Kit (Root)
                   (i386) 4.3.0,REV=0.2003.02.28
  2  SUNWxf86u     XFree86 Driver Porting Kit (User)
                   (i386) 4.3.0,REV=0.2003.02.28

.
.
.

Adding a Software Package to a Spool Directory

For convenience, you can copy frequently installed packages to a spool directory. If you copy packages to the default spool directory, /var/spool/pkg, you do not need to specify the source location of the package (-d device-name argument) when you use the pkgadd command. The pkgadd command, by default, checks the /var/spool/pkg directory for any packages specified on the command line. Note that copying packages to a spool directory is not the same as installing the packages on a system.

How to Add Software Packages to a Spool Directory (pkgadd)

  1. Become superuser or assume an equivalent role.

  2. Remove any already spooled packages with the same names as the packages you are adding.

    For information on removing spooled packages, see Example—Removing a Spooled Software Package.

  3. Add a software package to a spool directory.


    # pkgadd -d device-name -s spooldir pkgid ...

    -d device-name

    Specifies the absolute path to the software packages. device-name can be the path to a device, a directory, or a spool directory.

    -s spooldir

    Specifies the name of the spool directory where the package will be spooled. You must specify a spooldir.

    pkgid

    (Optional) Is the name of one or more packages, separated by spaces, to be added to the spool directory. If omitted, the pkgadd command copies all available packages.

  4. Verify that the package has been copied successfully to the spool directory.


    $ pkginfo -d spooldir| grep pkgid
    

    If pkgid is copied correctly, the pkginfo command returns a line of information about the pkgid. Otherwise, the pkginfo command returns the system prompt.

Example—Setting Up a Spool Directory From a Mounted CD

The following example shows how to transfer the SUNWman package from a mounted SPARC Solaris 9 CD to the default spool directory (/var/spool/pkg).


# pkgadd -d /cdrom/cdrom0/s0/Solaris_9/Product -s /var/spool/pkg SUNWman
Transferring <SUNWman> package instance

Example—Setting Up a Spool Directory From a Remote Software Package Server

If packages you want to copy are available from a remote system, you can manually mount the directory that contains the packages, in package format, and copy them to a local spool directory.

The following example shows the commands to do this scenario. In this example, assume that the remote system named package-server has software packages in the /latest-packages directory. The mount command mounts the package directory locally on /mnt, and the pkgadd command copies the SUNWpl5p package from /mnt to the default spool directory (/var/spool/pkg).


# mount -F nfs -o ro package-server:/latest-packages /mnt
# pkgadd -d /mnt -s /var/spool/pkg SUNWpl5p
Transferring <SUNWpl5p> package instance

If the automounter is running at your site, you do not have to mount the remote package server manually. Instead, use the automounter path, in this case, /net/package-server/latest-packages, as the argument to the -d option.


# pkgadd -d /net/package-server/latest-packages -s /var/spool/pkg SUNWpl5p
Transferring <SUNWpl5p> package instance

Example—Installing Software Packages From the Default Spool Directory

The following example shows how to install the SUNWpl5p package from the default spool directory. When no options are used, the pkgadd command searches the /var/spool/pkg directory for the named packages.


# pkgadd SUNWpl5p
	.
	.
	.
Installation of <SUNWpl5p> was successful.

How to List Information About All Installed Packages (pkginfo)

List information about installed packages with the pkginfo command.


$ pkginfo

Example—Listing All Packages Installed

The following example shows the pkginfo command to list all packages installed on a local system, whether that system is a standalone or server. The output shows the primary category, package name, and the description of the package.


$ pkginfo
system      SUNWaccr       System Accounting, (Root)
system      SUNWaccu       System Accounting, (Usr)
system      SUNWadmap      System administration applications
system      SUNWadmc       System administration core libraries
.
.
.

Example—Displaying Detailed Information About Software Packages


$ pkginfo -l SUNWcar
   PKGINST:  SUNWcar
      NAME:  Core Architecture, (Root)
  CATEGORY:  system
      ARCH:  sparc.sun4u
   VERSION:  11.9.0,REV=2002.04.06.15.27
   BASEDIR:  /
    VENDOR:  Sun Microsystems, Inc.
      DESC:  core software for a specific hardware platform group
    PSTAMP:  crash20020406153633
  INSTDATE:  Nov 19 2002 14:49
   HOTLINE:  Please contact your local service provider
    STATUS:  completely installed
     FILES:      111 installed pathnames
                  36 shared pathnames
                  40 directories
                  56 executables
               18843 blocks used (approx)

How to Check the Integrity of Installed Software Packages (pkgchk)

  1. Become superuser or assume an equivalent role.

  2. Check the status of an installed package.


    # pkgchk -a| -c -v pkgid ...
    # pkgchk -d spooldir pkgid ...

    -a

    Specifies to audit only the file attributes, that is, the permissions, rather than the file attributes and contents, which is the default. 

    -c

    Specifies to audit only the file contents, rather than the file contents and attributes, which is the default. 

    -v

    Specifies verbose mode, which displays file names as they are processed. 

    -d spooldir

    Specifies the absolute path of the spool directory. 

    pkgid

    (Optional) Is the name of one or more packages, separated by spaces. If you do not specify a pkgid, all the software packages installed on the system are checked.

Example—Checking the Contents of Installed Software Packages

The following example shows how to check the contents of a package.


# pkgchk -c SUNWbash

If no errors occur, the system prompt is returned. Otherwise, the pkgck command reports the error.

Example—Checking the File Attributes of Installed Software Packages

The following example shows how to check the file attributes of a package.


# pkgchk -a SUNWbash

If no errors occur, the system prompt is returned. Otherwise, the pkgck command reports the error.

Example—Checking Software Packages Installed in a Spool Directory

The following example shows how to check a software package that was copied to a spool directory (/export/install/packages).


# pkgchk -d /export/install/packages
## checking spooled package <SUNWadmap>
## checking spooled package <SUNWadmfw>
## checking spooled package <SUNWadmc>
## checking spooled package <SUNWsadml>

Note –

The checks made on a spooled package are limited because not all information can be audited until a package is installed.


Removing Software Packages

Use the associated tool that you used to add or install a software package to remove or uninstall a software package. For example, if you used the Web Start installer to install software, use the Web Start uninstaller to uninstall software.


Caution – Caution –

Do not use the rm command to remove software packages.


How to Remove Software Packages (pkgrm)

  1. Become superuser or assume an equivalent role.

  2. Remove an installed package.


    # pkgrm pkgid ...

    pkgid identifies the name of one or more packages, separated by spaces, to be removed. If omitted, pkgrm removes all available packages.

Example—Removing Software Packages

This example shows how to remove a package.


# pkgrm SUNWctu

The following package is currently installed:
   SUNWctu         Netra ct usr/platform links (64-bit)
                   (sparc.sun4u) 11.9.0,REV=2001.07.24.15.53

Do you want to remove this package? y

## Removing installed package instance <SUNWctu>
## Verifying package dependencies.
## Processing package information.
## Removing pathnames in class <none>
.
.
.

Example—Removing a Spooled Software Package

This example shows how to remove a spooled package.


# pkgrm -s /export/pkg SUNWaudh
The following package is currently spooled:
   SUNWaudh        Audio Header Files
                   (sparc) 11.10.0,REV=2003.08.08.00.03
Do you want to remove this package? y
Removing spooled package instance <SUNWaudh>

Adding and Removing Software Packages With Admintool (Task Map)

The following task map describes the software management tasks that you can do with Admintool.

Task 

Description 

For Instructions 

Add software packages with Admintool 

You can view or add software packages. 

How to Add Software Packages With Admintool

Remove software packages with Admintool 

You can view or remove software packages. 

How to Remove Software Packages With Admintool

The Solaris operating system includes Admintool, which is a graphical user interface for performing several administration tasks, including adding and removing software packages. Specifically, you can use Admintool to do the following:

How to Add Software Packages With Admintool

  1. Become superuser.

    Unless you are a member of the sysadmin group (group 14), you must become superuser or assume an equivalent role to add or remove software packages with Admintool.

  2. Load a Solaris 9 Software CD or DVD into the drive.

    Volume Manager automatically mounts the CD.

  3. Start Admintool.


    # admintool &
    

    The Users window is displayed.

  4. Choose Software from the Browse menu.

    The Software window is displayed.

  5. Choose Add from the Edit menu.

    The Set Source Media window might appear. If so, specify the path to the installation media and click OK. The default path is a mounted Solaris CD.

    The Add Software window is displayed.

    Simple screen capture titled Admintool: Add Software. Shows Software and Description panes. Shows the Set Source Media button and five other buttons.
  6. Select the software you want to install on the local system.

    In the Software portion of the window, click the check boxes that correspond to the software you want to install.

  7. Click Add.

    A Command Tool window appears for each package being installed, displaying the installation output.

    The Software window is refreshed to display the packages just added.

How to Remove Software Packages With Admintool

  1. Become superuser.

    Unless you are a member of the sysadmin group (group 14), you must become superuser or assume an equivalent role to add or remove software packages with Admintool.

  2. Start Admintool.


    # admintool &
    

    The Users window is displayed.

  3. Choose Software from the Browse menu.

    The Software window is displayed.

    Simple screen capture titled Admintool: Add Software. Shows an alphabetical and scrollable list of installed software.
  4. Select the software you want to delete from the local system.

  5. Choose Delete from the Edit menu.

    A warning pop-up window is displayed to confirm whether you really want to delete the software.

  6. Click Delete to confirm that you want to delete the software.

    For each package that is being deleted, a Command Tool window is displayed that asks for confirmation, again, before deleting the software. Type y, n, or q. If you choose to delete the software, the output from the removal process is displayed.