Previous section.

Systems Management: Distributed Software Administration
Copyright © 1997 The Open Group

NAME

swremove - remove software

SYNOPSIS

swremove [-d][-r][-p][-f file][-t targetfile][-x option=value]
[
-X options_file][software_selections][@ targets]

DESCRIPTION

The swremove utility performs the opposite function of the install software utility or the copy software utility. It removes installed software or software stored in a distribution.

The swremove utility removes software installed at the local host or at the targets specified on the command line. It also removes software from local or remote distributions.

OPTIONS

The swremove utility supports the following options. Where there is no description, the description in Common Definition for Utilities applies.

-d

-f file

-p

-r

-t targetfile

-x option=value

-X options_file

OPERANDS

The swremove utility supports the software_selections and targets operands described in Common Definition for Utilities .

This utility need not support a target distribution in the serial format.

EXTERNAL INFLUENCES

See Common Definition for Utilities for descriptions of external influences common to all utilities.

Extended Options

The swremove utility supports the following extended options. The description in Common Definition for Utilities applies.

autoselect_dependents=false

distribution_target_directory=implementation_defined_value

enforce_dependencies=true

enforce_scripts=true

installed_software_catalog=implementation_defined_value

logfile=implementation_defined_value

loglevel=1

select_local=true

software=

targets=

verbose=1

EXTERNAL EFFECTS

See Common Definition for Utilities .

EXTENDED DESCRIPTION

See Common Definition for Utilities for general information. The swremove utility consists of three main phases.

  1. Selection phase

  2. Analysis phase

  3. Execution phase.

Selection Phase

As opposed to swinstall, software selections apply to the target distribution or installed_software.

Each specified selection must pass the following checks. If a specification does not pass a check, the implementation defined error handling procedure is invoked.

Add any dependent software to the selection list if autoselect_dependents=true.

Analysis Phase

This section details the analysis phase. The analysis phase occurs before the removing of files begins, and involves executing checks to determine whether or not the removal should be attempted. No aspect of the target host environment is modified, so canceling the removal after these operations has no negative effect.

The target role makes the following checks:

If a software object has been specified for removal, and there is a bundle referring to that object that has not also been specified for removal, the behavior is implementation defined. Likewise, if a fileset or subproduct object has been specified for removal, and there is a subproduct referring to that object that has not also been specified for removal, the behavior is implementation defined.

Execution Phase

For installed_software, the sequential relationship between the unconfigure, preremove, and postremove scripts, and removing files for swremove is shown in the following list. The unconfigure scripts are only run if the target directory is /.

  1. Unconfigure each product:

    If the fileset has been configured more than once, the unconfigure script must unconfigure each instance.

    1. Unconfigure each fileset in the product:

      1. Run the unconfigure script for the fileset.

      2. Update the result of the script. Update the state of the fileset in the product to installed in the database for the installed_software object.

    2. Run the unconfigure script for the product.

  2. Remove each product:

    1. Run the preremove script for the product.

    2. Remove each fileset in the product:

      1. Update the state of the fileset to transient in the catalog for the installed_software object.

      2. Run the preremove script for the fileset.

      3. Remove the files for the fileset.

      4. Run the postremove script for the fileset.

      5. Update the results of the scripts. Update the state of the fileset to removed in the catalog for the installed_software object or remove the catalog information for the fileset.

    3. Run the postremove script for the product.

    4. If the catalog information has been removed for all filesets in the product, an implementation can also remove the catalog information for the product and its contained subproducts.

  3. Remove each bundle:

    1. Remove the installed_software catalog information for the bundle.

  4. If the catalog information has been removed for all products and bundles in the installed_software object, an implementation can also remove the catalog information for the installed_software object.

For each fileset that failed to be removed, the installed_software catalog information is updated to the state corrupt.

EXIT STATUS

See Common Definition for Utilities .

CONSEQUENCES OF ERRORS

See Common Definition for Utilities .

Why not acquire a nicely bound hard copy?
Click here to return to the publication details or order a copy of this publication.

Contents Next section Index