| Skip Navigation Links | |
| Exit Print View | |
![]() | man pages section 1M: System Administration Commands Oracle Solaris 11 Information Library |
- remove a package from the system
pkgrm [-nv] [-aadmin] [ [-A |-M]-Rroot_path] [-Vfs_file] [pkginst... |-Ycategory[,category…]]
pkgrm-sspool [pkginst... |-Ycategory[,category…]]
pkgrm will remove a previously installed or partially installed package from thesystem. A check is made to determine if any other packages dependon the one being removed. If a dependency exists, the action takenis defined in theadmin file.
The default state for the command is in interactive mode, meaning thatprompt messages are given during processing to allow the administrator to confirmthe actions being taken. Non-interactive mode can be requested with the-noption.
The-s option can be used to specify the directory from whichspooled packages should be removed.
Certain unbundled and third-party packages are no longer entirely compatible with thelatest version ofpkgrm. These packages require user interaction throughout the removaland not just at the very beginning.
To remove these older packages (released prior to Solaris 2.4), set thefollowing environment variable:NONABI_SCRIPTS=TRUEpkgrm permits keyboard interaction throughout the removal as longas this environment variable is set.
The following options are supported:
Use the installation administration file,admin, in place of the defaultadmin file.pkgrm first looks in the current working directory for the administration file. If the specified administration file is not in the current working directory,pkgrm looks in the/var/sadm/install/admin directory for the administration file.
Remove the package files from the client's file system, absolutely. If a file is shared with other packages, the default behavior is to not remove the file from the client's file system.
Instructpkgrm not to use the$root_path/etc/vfstab file for determining the client's mount points. This option assumes the mount points are correct on the server and it behaves consistently with Solaris 2.5 and earlier releases.
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-restrictiveadmin file needs to be used.
Defines the full path name of a directory to use as theroot_path. All files, including package system information files, are relocated to a directory tree starting in the specifiedroot_path.
Note -The root file system of any non-global zones must not be referenced with the-R option. Doing so might damage the global zone's file system, might compromise the security of the global zone, and might damage the non-global zone's file system. Seezones(5).
Remove the specified package(s) from the directoryspool. The default directory for spooled packages is/var/sadm/pkg.
Trace all of the scripts that get executed bypkgrm, located in thepkginst/install directory. This option is used for debugging the procedural and non-procedural scripts.
Specify an alternativefs_file to map the client's file systems. Used in situations where the$root_path/etc/vfstab file is non-existent or unreliable.
Remove packages based on the value of theCATEGORY parameter stored in the installed or spooled package'spkginfo(4) file. No package with theCATEGORY value ofsystem can removed from the file system with this option.
The following operand is supported:
Specifies the package to be removed. The formatpkginst.* 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 ofSUNWjunk fromclient1
The following example removes all instances ofSUNWjunk fromclient1:
example% pkgrm-R /export/root/client1 SUNWjunk*
Note the caveat on the use of the-R option in thedescription of that option, above.
The following exit values are returned:
Successful completion.
Fatal error.
Warning.
Interruption.
Administration.
Reboot after removal of all packages.
Reboot after removal of this package.
Seeattributes(5) for descriptions of the following attributes:
|
pkginfo(1),pkgmk(1),pkgparam(1),pkgproto(1),pkgtrans(1),installf(1M),pkgadd(1M),pkgask(1M),pkgchk(1M),removef(1M),admin(4),pkginfo(4),attributes(5),largefile(5)
Application Packaging Developer’s Guide
Package commands arelargefile(5)-aware. They handle files larger than 2 GB inthe same way they handle smaller files. In their current implementations,pkgadd(1M),pkgtrans(1) and other package commands can process a datastream of up to4 GB.
Copyright © 2011, Oracle and/or its affiliates. All rights reserved.Legal Notices | ![]() ![]() |