1removef(1M) System Administration Commands removef(1M)
2
3
4
6 removef - remove a file from software database
7
9 removef [ [-M] -R root_path] [-V fs_file] pkginst path...
10
11
12 removef [ [-M] -R root_path] [-V fs_file] -f pkginst
13
14
16 removef informs the system that the user, or software, intends to
17 remove a pathname. Output from removef is the list of input pathnames
18 that may be safely removed (no other packages have a dependency on
19 them).
20
22 The following options are supported:
23
24 -f
25
26 After all files have been processed, removef should be invoked with
27 the -f option to indicate that the removal phase is complete.
28
29
30 -M
31
32 Instruct removef not to use the $root_path/etc/vfstab file for
33 determining the client's mount points. This option assumes the
34 mount points are correct on the server and it behaves consistently
35 with Solaris 2.5 and earlier releases.
36
37
38 -R root_path
39
40 Define the full path name of a directory to use as the root_path.
41 All files, including package system information files, are relo‐
42 cated to a directory tree starting in the specified root_path. The
43 root_path may be specified when installing to a client from a
44 server (for example, /export/root/client1).
45
46 removef inherits the value of the PKG_INSTALL_ROOT environment
47 variable. (See ENVIRONMENT VARIABLES, below.) If PKG_INSTALL_ROOT
48 is set, such as when the -R option is used with pkgadd(1M) or
49 pkgrm(1M), there is no need to use the removef -R option.
50
51 Note -
52
53 The root file system of any non-global zones must not be refer‐
54 enced with the -R option. Doing so might damage the global zone's
55 file system, might compromise the security of the global zone,
56 and might damage the non-global zone's file system. See zones(5).
57
58
59 -V fs_file
60
61 Specify an alternative fs_file to map the client's file systems.
62 For example, used in situations where the $root_path/etc/vfstab
63 file is non-existent or unreliable.
64
65
67 The following operands are supported:
68
69 path
70
71 The pathname to be removed.
72
73
74 pkginst
75
76 The package instance from which the pathname is being removed.
77
78
80 Example 1 Using removef
81
82
83 The following example uses the removef command in an optional pre-
84 install script:
85
86
87 echo "The following files are no longer part of this package
88 and are being removed."
89 removef $PKGINST /myapp/file1 /myapp/file2 |
90 while read pathname
91 do
92 echo "$pathname"
93 rm -f $pathname
94 done
95 removef -f $PKGINST || exit 2
96
97
98
100 removef inherits the value of the following environment variable. This
101 variable is set when pkgadd(1M) or pkgrm(1M) is invoked with the -R
102 option.
103
104 PKG_INSTALL_ROOT
105
106 If present, defines the full path name of a directory to use as the
107 system's PKG_INSTALL_ROOT path. All product and package information
108 files are then looked for in the directory tree, starting with the
109 specified PKG_INSTALL_ROOT path. If not present, the default system
110 path of / is used.
111
112
114 0
115
116 Successful completion.
117
118
119 >0
120
121 An error occurred.
122
123
125 See attributes(5) for descriptions of the following attributes:
126
127
128
129
130 ┌─────────────────────────────┬─────────────────────────────┐
131 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
132 ├─────────────────────────────┼─────────────────────────────┤
133 │Availability │SUNWcsu │
134 └─────────────────────────────┴─────────────────────────────┘
135
137 pkginfo(1), pkgmk(1), pkgparam(1), pkgproto(1), pkgtrans(1),
138 installf(1M), pkgadd(1M), pkgask(1M), pkgchk(1M), pkgrm(1M),
139 attributes(5), largefile(5)
140
141
142
143
145 Package commands are largefile(5)-aware. They handle files larger than
146 2 GB in the same way they handle smaller files. In their current imple‐
147 mentations, pkgadd(1M), pkgtrans(1) and other package commands can
148 process a datastream of up to 4 GB.
149
150
151
152SunOS 5.11 30 Oct 2007 removef(1M)