8980 BIOS clock is sometimes one hour fast
[unleashed.git] / usr / src / man / man1m / pkgrm.1m
blobae73ea98bf95dc81a29ceda5e45be0db01fbaf4d
1 '\" te
2 .\"  Copyright 1989 AT&T  Copyright (c) 2007, Sun Microsystems, Inc.  All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH PKGRM 1M "Oct 30, 2007"
7 .SH NAME
8 pkgrm \- remove a package from the system
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBpkgrm\fR [\fB-nv\fR] [\fB-a\fR \fIadmin\fR] [ [\fB-A\fR | \fB-M\fR] \fB-R\fR \fIroot_path\fR]
13      [\fB-V\fR \fIfs_file\fR]
14      [pkginst... | \fB-Y\fR \fIcategory\fR[,\fIcategory\fR\&.\|.\|.]]
15 .fi
17 .LP
18 .nf
19 \fBpkgrm\fR \fB-s\fR \fIspool\fR
20      [pkginst... | \fB-Y\fR \fIcategory\fR[,\fIcategory\fR\&.\|.\|.]]
21 .fi
23 .SH DESCRIPTION
24 .sp
25 .LP
26 \fBpkgrm\fR will remove a previously installed or partially installed package
27 from the system. A check is made to determine if any other packages depend on
28 the one being removed. If a dependency exists, the action taken is defined in
29 the \fBadmin\fR file.
30 .sp
31 .LP
32 The default state for the command is in interactive mode, meaning that prompt
33 messages are given during processing to allow the administrator to confirm the
34 actions being taken. Non-interactive mode can be requested with the \fB-n\fR
35 option.
36 .sp
37 .LP
38 The \fB-s\fR option can be used to specify the directory from which spooled
39 packages should be removed.
40 .sp
41 .LP
42 Certain unbundled and third-party packages are no longer entirely compatible
43 with the latest version of \fBpkgrm\fR. These packages require user interaction
44 throughout the removal and not just at the very beginning.
45 .sp
46 .LP
47 To remove these older packages (released prior to Solaris 2.4), set the
48 following environment variable:\fBNONABI_SCRIPTS=TRUE\fR \fBpkgrm\fR permits
49 keyboard interaction throughout the removal as long as this environment
50 variable is set.
51 .SH OPTIONS
52 .sp
53 .LP
54 The following options are supported:
55 .sp
56 .ne 2
57 .na
58 \fB\fB-a\fR \fIadmin\fR\fR
59 .ad
60 .sp .6
61 .RS 4n
62 Use the installation administration file, \fBadmin\fR, in place of the default
63 \fBadmin\fR file. \fBpkgrm\fR first looks in the current working directory for
64 the administration file. If the specified administration file is not in the
65 current working directory, \fBpkgrm\fR looks in the
66 \fB/var/sadm/install/admin\fR directory for the administration file.
67 .RE
69 .sp
70 .ne 2
71 .na
72 \fB\fB-A\fR\fR
73 .ad
74 .sp .6
75 .RS 4n
76 Remove the package files from the client's file system, absolutely. If a file
77 is shared with other packages, the default behavior is to not remove the file
78 from the client's file system.
79 .RE
81 .sp
82 .ne 2
83 .na
84 \fB\fB-M\fR\fR
85 .ad
86 .sp .6
87 .RS 4n
88 Instruct \fBpkgrm\fR not to use the \fB$\fR\fIroot_path\fR\fB/etc/vfstab\fR
89 file for determining the client's mount points. This option assumes the mount
90 points are correct on the server and it behaves consistently with Solaris 2.5
91 and earlier releases.
92 .RE
94 .sp
95 .ne 2
96 .na
97 \fB\fB-n\fR\fR
98 .ad
99 .sp .6
100 .RS 4n
101 Non-interactive mode. If there is a need for interaction, the command will
102 exit.
104 Use of this option requires that at least one package instance be named upon
105 invocation of the command. Certain conditions must exist for a package to be
106 removed non-interactively or a non-restrictive \fBadmin\fR file needs to be
107 used.
111 .ne 2
113 \fB\fB-R\fR \fIroot_path\fR\fR
115 .sp .6
116 .RS 4n
117 Defines the full path name of a directory to use as the \fIroot_path\fR. All
118 files, including package system information files, are relocated to a directory
119 tree starting in the specified \fIroot_path\fR.
121 Note -
123 .RS 2
124 The root file system of any non-global zones must not be referenced with the
125 \fB-R\fR option. Doing so might damage the global zone's file system, might
126 compromise the security of the global zone, and might damage the non-global
127 zone's file system. See \fBzones\fR(5).
132 .ne 2
134 \fB\fB-s\fR \fIspool\fR\fR
136 .sp .6
137 .RS 4n
138 Remove the specified package(s) from the directory \fIspool\fR. The default
139 directory for spooled packages is \fB/var/sadm/pkg\fR.
143 .ne 2
145 \fB\fB-v\fR\fR
147 .sp .6
148 .RS 4n
149 Trace all of the scripts that get executed by \fBpkgrm\fR, located in the
150 \fIpkginst\fR\fB/install\fR directory. This option is used for debugging the
151 procedural and non-procedural scripts.
155 .ne 2
157 \fB\fB-V\fR \fIfs_file\fR\fR
159 .sp .6
160 .RS 4n
161 Specify an alternative \fIfs_file\fR to map the client's file systems. Used in
162 situations where the \fB$\fR\fIroot_path\fR\fB/etc/vfstab\fR file is
163 non-existent or unreliable.
167 .ne 2
169 \fB\fB-Y\fR \fIcategory\fR\fR
171 .sp .6
172 .RS 4n
173 Remove packages based on the value of the \fBCATEGORY\fR parameter stored in
174 the installed or spooled package's \fBpkginfo\fR(4) file. No package with the
175 \fBCATEGORY\fR value of \fBsystem\fR can removed from the file system with this
176 option.
179 .SH OPERANDS
182 The following operand is supported:
184 .ne 2
186 \fB\fIpkginst\fR\fR
188 .sp .6
189 .RS 4n
190 Specifies the package to be removed. The format \fIpkginst\fR\fB\&.*\fR can be
191 used to remove all instances of a package.
193 The asterisk character (\fB*\fR) is a special character to some shells and may
194 need to be escaped. In the C-Shell, "\fB*\fR" must be surrounded by single
195 quotes (\fB\&'\fR) or preceded by a backslash (\e).
198 .SH EXAMPLES
200 \fBExample 1 \fRRemoving All Instances of \fBSUNWjunk\fR from \fBclient1\fR
203 The following example removes all instances of \fBSUNWjunk\fR from
204 \fBclient1\fR:
207 .in +2
209 example% pkgrm \fB-R\fR /export/root/client1 SUNWjunk*
211 .in -2
216 Note the caveat on the use of the \fB-R\fR option in the description of that
217 option, above.
219 .SH EXIT STATUS
222 The following exit values are returned:
224 .ne 2
226 \fB\fB0\fR\fR
228 .sp .6
229 .RS 4n
230 Successful completion.
234 .ne 2
236 \fB\fB1\fR\fR
238 .sp .6
239 .RS 4n
240 Fatal error.
244 .ne 2
246 \fB\fB2\fR\fR
248 .sp .6
249 .RS 4n
250 Warning.
254 .ne 2
256 \fB\fB3\fR\fR
258 .sp .6
259 .RS 4n
260 Interruption.
264 .ne 2
266 \fB\fB4\fR\fR
268 .sp .6
269 .RS 4n
270 Administration.
274 .ne 2
276 \fB\fB10\fR\fR
278 .sp .6
279 .RS 4n
280 Reboot after removal of all packages.
284 .ne 2
286 \fB\fB20\fR\fR
288 .sp .6
289 .RS 4n
290 Reboot after removal of this package.
293 .SH SEE ALSO
296 \fBpkginfo\fR(1), \fBpkgmk\fR(1), \fBpkgparam\fR(1), \fBpkgproto\fR(1),
297 \fBpkgtrans\fR(1), \fBinstallf\fR(1M), \fBpkgadd\fR(1M), \fBpkgask\fR(1M),
298 \fBpkgchk\fR(1M), \fBremovef\fR(1M), \fBadmin\fR(4), \fBpkginfo\fR(4),
299 \fBattributes\fR(5), \fBlargefile\fR(5)
302 \fI\fR
303 .SH NOTES
306 Package commands are \fBlargefile\fR(5)-aware. They handle files larger than 2
307 GB in the same way they handle smaller files. In their current implementations,
308 \fBpkgadd\fR(1M), \fBpkgtrans\fR(1) and other package commands can process a
309 datastream of  up to 4 GB.