1502 Remove conversion cruft from manpages
[unleashed.git] / usr / src / man / man1m / removef.1m
blob038e9066afeb5e1513f0c6957f92d3e56f7e2ab7
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 REMOVEF 1M "Oct 30, 2007"
7 .SH NAME
8 removef \- remove a file from software database
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBremovef\fR [ [\fB-M\fR] \fB-R\fR \fIroot_path\fR] [\fB-V\fR \fIfs_file\fR] \fIpkginst\fR \fIpath\fR...
13 .fi
15 .LP
16 .nf
17 \fBremovef\fR [ [\fB-M\fR] \fB-R\fR \fIroot_path\fR] [\fB-V\fR \fIfs_file\fR] \fB-f\fR \fIpkginst\fR
18 .fi
20 .SH DESCRIPTION
21 .sp
22 .LP
23 \fBremovef\fR informs the system that the user, or software, intends to remove
24 a pathname. Output from \fBremovef\fR is the list of input pathnames that may
25 be safely removed (no other packages have a dependency on them).
26 .SH OPTIONS
27 .sp
28 .LP
29 The following options are supported:
30 .sp
31 .ne 2
32 .na
33 \fB\fB-f\fR\fR
34 .ad
35 .sp .6
36 .RS 4n
37 After all files have been processed, \fBremovef\fR should be invoked with the
38 \fB-f\fR option to indicate that the removal phase is complete.
39 .RE
41 .sp
42 .ne 2
43 .na
44 \fB\fB-M\fR\fR
45 .ad
46 .sp .6
47 .RS 4n
48 Instruct \fBremovef\fR not to use the \fB$\fR\fIroot_path\fR\fB/etc/vfstab\fR
49 file for determining the client's mount points. This option assumes the mount
50 points are correct on the server and it behaves consistently with Solaris 2.5
51 and earlier releases.
52 .RE
54 .sp
55 .ne 2
56 .na
57 \fB\fB\fR\fB-R\fR \fIroot_path\fR\fR
58 .ad
59 .sp .6
60 .RS 4n
61 Define the full path name of a directory to use as the \fIroot_path\fR. All
62 files, including package system information files, are relocated to a directory
63 tree starting in the specified \fIroot_path\fR. The \fIroot_path\fR may be
64 specified when installing to a client from a server (for example,
65 \fB/export/root/client1\fR).
66 .sp
67 \fBremovef\fR inherits the value of the \fBPKG_INSTALL_ROOT\fR environment
68 variable. (See ENVIRONMENT VARIABLES, below.) If \fBPKG_INSTALL_ROOT\fR is set,
69 such as when the \fB-R\fR option is used with \fBpkgadd\fR(1M) or
70 \fBpkgrm\fR(1M), there is no need to use the \fBremovef\fR \fB-R\fR option.
71 .LP
72 Note -
73 .sp
74 .RS 2
75 The root file system of any non-global zones must not be referenced with the
76 \fB-R\fR option. Doing so might damage the global zone's file system, might
77 compromise the security of the global zone, and might damage the non-global
78 zone's file system. See \fBzones\fR(5).
79 .RE
80 .RE
82 .sp
83 .ne 2
84 .na
85 \fB\fB-V\fR \fIfs_file\fR\fR
86 .ad
87 .sp .6
88 .RS 4n
89 Specify an alternative \fIfs_file\fR to map the client's file systems. For
90 example, used in situations where the \fB$\fR\fIroot_path\fR\fB/etc/vfstab\fR
91 file is non-existent or unreliable.
92 .RE
94 .SH OPERANDS
95 .sp
96 .LP
97 The following operands are supported:
98 .sp
99 .ne 2
101 \fB\fIpath\fR\fR
103 .sp .6
104 .RS 4n
105 The pathname to be removed.
109 .ne 2
111 \fB\fIpkginst\fR\fR
113 .sp .6
114 .RS 4n
115 The package instance from which the pathname is being removed.
118 .SH EXAMPLES
120 \fBExample 1 \fRUsing \fBremovef\fR
123 The following example uses the \fBremovef\fR command in an optional pre-install
124 script:
127 .in +2
129 echo "The following files are no longer part of this package
130       and are being removed."
131 removef $PKGINST /myapp/file1 /myapp/file2 |
132 while read pathname
134      echo "$pathname"
135      rm \fB-f\fR $pathname
136 done
137 removef \fB-f\fR $PKGINST || exit 2
139 .in -2
142 .SH ENVIRONMENT VARIABLES
145 \fBremovef\fR inherits the value of the following environment variable. This
146 variable is set when \fBpkgadd\fR(1M) or \fBpkgrm\fR(1M) is invoked with the
147 \fB-R\fR option.
149 .ne 2
151 \fB\fBPKG_INSTALL_ROOT\fR\fR
153 .sp .6
154 .RS 4n
155 If present, defines the full path name of a directory to use as the system's
156 \fBPKG_INSTALL_ROOT\fR path. All product and package information files are then
157 looked for in the directory tree, starting with the specified
158 \fBPKG_INSTALL_ROOT\fR path. If not present, the default system path of \fB/\fR
159 is used.
162 .SH EXIT STATUS
164 .ne 2
166 \fB\fB0\fR\fR
168 .sp .6
169 .RS 4n
170 Successful completion.
174 .ne 2
176 \fB\fB>0\fR\fR
178 .sp .6
179 .RS 4n
180 An error occurred.
183 .SH SEE ALSO
186 \fBpkginfo\fR(1), \fBpkgmk\fR(1), \fBpkgparam\fR(1), \fBpkgproto\fR(1),
187 \fBpkgtrans\fR(1), \fBinstallf\fR(1M), \fBpkgadd\fR(1M), \fBpkgask\fR(1M),
188 \fBpkgchk\fR(1M), \fBpkgrm\fR(1M), \fBattributes\fR(5), \fBlargefile\fR(5)
191 \fI\fR
192 .SH NOTES
195 Package commands are \fBlargefile\fR(5)-aware. They handle files larger than 2
196 GB in the same way they handle smaller files. In their current implementations,
197 \fBpkgadd\fR(1M), \fBpkgtrans\fR(1) and other package commands can process a
198 datastream of  up to 4 GB.