pkgrm Command
Purpose
Removes a package or set from the system.
Syntax
Description
pkgrm Removes a previously installed or partially installed package or set from the system. A package is a collection of related files and executables that can be independently installed. A set is made up of a special-purpose package, referred to as a Set Installation Package (SIP), and a collection of one or more packages that are members of the set.
pkgrm Checks that all packages listed on the command line are on the system. If any of the packages that are listed do not exist, no changes are made to the system, that is, none of the listed packages are removed.
A check is also made to determine whether any other packages depend on the one being removed. The action taken if a dependency exists is defined in the Admin file (see the -a flag).
The default state for the command is interactive mode, meaning that prompt messages are given during processing to allow the administrator to confirm the actions being taken. Non-interactive mode can be requested with the -n flag.
The -s flag can be used to specify the directory from which spooled packages should be removed.
Flags
Item | Description |
---|---|
-n | Enables non-interactive mode. If there is a need for interaction, the command exits. Use of this flag requires that at least one package instance be named upon invocation of the command. |
-a Admin | Defines an installation administration file, Admin, to be used in place of the default
administration file. [For a description of the format of an Admin file, see the admin
file format.] The token "none" overrides the use of any Admin file, and thus forces
interaction with the user. Unless a full pathname is given, pkgrm looks in the
/var/sadm/install/admin directory for the file. By default, the file default in that
directory is used. |
-P Path | Removes the specified packages from the alternative root directory path. |
-s Spool | Removes one or more specified packages from the directory Spool. |
Pkginst | Defines a short string that is used to designate an abbreviation for the package or set name.
(The term package instance is used loosely: it refers to all instantiations of
Pkginst, even those that do not include instance identifiers.) If Pkginst specifies a SIP, all installed packages, which are members of the set, and the SIP itself, are removed in reverse dependency order. To indicate all instances of a package, specify 'Pkginst |
Exit Status
Item | Description |
---|---|
0 | Successful completion of script. |
1 | Fatal error. The installation process is terminated. |
99 | Internal error. |
Files
Item | Description |
---|---|
/usr/sbin/pkgrm | Contains the pkgrm command |