System Administration Guide: Basic Administration

ProcedureHow to Uninstall Software (prodreg)

You can use the uninstall subcommand of the prodreg command to remove software from your system. When you uninstall software by using 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 for Software Dependencies (prodreg).

After you uninstall software, you can remove that 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.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  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 10
                                                              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 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

    The sample output shows that no other software depends on the child components of name software.

  6. Unregister the software and its 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 19–9 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 10
                                                          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