pkgrm - remove a package from the system
pkgrm [-nv] [-R root_path] [pkginst... | -Y category[,category...]]
pkgrm -s spool [pkginst... | -Y category[,category...]]
pkgrm will remove a previously installed or partially installed package from the system. A check is made to determine if any other packages depend on the one being removed.
The default state for the command is in 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 option.
The -s option can be used to specify the directory from which spooled packages should be removed.
Certain unbundled and third-party packages are no longer entirely compatible with the latest version of pkgrm. These packages require user interaction throughout the removal and not just at the very beginning.
To remove these older packages , set the following environment variable: NONABI_SCRIPTS=TRUE. pkgrm permits keyboard interaction throughout the removal as long as this environment variable is set.
The following options and operands are supported:
-n Non-interactive mode. If there is a need for interaction, the command will exit. Use of this option requires that at least one package instance be named upon invocation of the command. Certain conditions must exist for a package to be removed non-interactively or a non-restrictive admin file needs to be used. -R root_path Defines the full path name of a directory to use as the root_path. All files, including package system information files, are relocated to a directory tree starting in the specified root_path. -s spool Remove the specified package(s) from the directory spool. The default directory for spooled packages is /var/sadm/pkg. -v Trace all of the scripts that get executed by pkgrm, located in the pkginst/install directory. This option is used for debugging the procedural and non-procedural scripts. -Y category Remove packages based on the value of the CATEGORY parameter stored in the installed or spooled package's pkginfo(5) file. No package with the CATEGORY value of system can removed from the file system with this option. pkginst Specifies the package to be removed. The format pkginst.* can be used to remove all instances of a package. The asterisk character (*) is a special character to some shells and may need to be escaped. In the C-Shell, "*" must be surrounded by single quotes (') or preceded by a backslash (\).
Example 1 Removing All instances of SUNWjunk From client1
The following example removes all instances of SUNWjunk from client1:
pkgrm -R /export/root/client1 SUNWjunk*
Note the caveat on the use of the -R option in the description of that option, above.
The following exit values are returned:
0 Successful completion. 1 Fatal error. 2 Warning. 3 Interruption. 4 Administration. 10 Reboot after removal of all packages. 20 Reboot after removal of this package.
pkginfo(1), pkgmk(1), pkgparam(1), pkgproto(1), pkgtrans(1), installf(1M), pkgadd(1M), pkgask(1M), pkgchk(1M), removef(1M), pkginfo(5),
|Heirloom Packaging Tools||PKGRM (1M)||2/25/07|