System Administration Guide: Basic Administration

ProcedureHow 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.

    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 -m "name"
    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
    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 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 19–10 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 10 
                                                          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