1pkgrm(1M)               System Administration Commands               pkgrm(1M)
2
3
4

NAME

6       pkgrm - remove a package from the system
7

SYNOPSIS

9       pkgrm [-nv] [-a admin] [ [-A | -M] -R root_path]
10            [-V fs_file]
11            [pkginst... | -Y category[,category...]]
12
13
14       pkgrm -s spool
15            [pkginst... | -Y category[,category...]]
16
17

DESCRIPTION

19       pkgrm will remove a previously installed or partially installed package
20       from the system. A check is made to determine  if  any  other  packages
21       depend  on  the  one  being removed. If a dependency exists, the action
22       taken is defined in the admin file.
23
24
25       The default state for the command is in interactive mode, meaning  that
26       prompt  messages are given during processing to allow the administrator
27       to confirm  the  actions  being  taken.  Non-interactive  mode  can  be
28       requested with the -n option.
29
30
31       The  -s  option can be used to specify the directory from which spooled
32       packages should be removed.
33
34
35       Certain unbundled and third-party packages are no longer entirely  com‐
36       patible  with  the latest version of pkgrm. These packages require user
37       interaction throughout the removal and not just at the very beginning.
38
39
40       To remove these older packages (released prior to Solaris 2.4), set the
41       following  environment  variable:NONABI_SCRIPTS=TRUE pkgrm permits key‐
42       board interaction throughout the removal as long  as  this  environment
43       variable is set.
44

OPTIONS

46       The following options are supported:
47
48       -a admin
49
50           Use  the  installation  administration file, admin, in place of the
51           default admin file. pkgrm first looks in the current working direc‐
52           tory  for  the administration file. If the specified administration
53           file is not in the current working directory, pkgrm  looks  in  the
54           /var/sadm/install/admin directory for the administration file.
55
56
57       -A
58
59           Remove the package files from the client's file system, absolutely.
60           If a file is shared with other packages, the default behavior is to
61           not remove the file from the client's file system.
62
63
64       -M
65
66           Instruct pkgrm not to use the $root_path/etc/vfstab file for deter‐
67           mining the client's mount points. This  option  assumes  the  mount
68           points  are  correct on the server and it behaves consistently with
69           Solaris 2.5 and earlier releases.
70
71
72       -n
73
74           Non-interactive mode. If there is a need for interaction, the  com‐
75           mand will exit.
76
77           Use  of  this option requires that at least one package instance be
78           named upon invocation of the command. Certain conditions must exist
79           for  a package to be removed non-interactively or a non-restrictive
80           admin file needs to be used.
81
82
83       -R root_path
84
85           Defines the full path name of a directory to use as the  root_path.
86           All  files,  including  package system information files, are relo‐
87           cated to a directory tree starting in the specified root_path.
88
89           Note -
90
91             The root file system of any non-global zones must not  be  refer‐
92             enced with the -R option. Doing so might damage the global zone's
93             file system, might compromise the security of  the  global  zone,
94             and might damage the non-global zone's file system. See zones(5).
95
96
97       -s spool
98
99           Remove  the  specified  package(s)  from  the  directory spool. The
100           default directory for spooled packages is /var/sadm/pkg.
101
102
103       -v
104
105           Trace all of the scripts that get executed by pkgrm, located in the
106           pkginst/install  directory.  This  option is used for debugging the
107           procedural and non-procedural scripts.
108
109
110       -V fs_file
111
112           Specify an alternative fs_file to map the  client's  file  systems.
113           Used  in  situations  where  the $root_path/etc/vfstab file is non-
114           existent or unreliable.
115
116
117       -Y category
118
119           Remove packages based on the value of the CATEGORY parameter stored
120           in  the  installed or spooled package's pkginfo(4) file. No package
121           with the CATEGORY value of system can removed from the file  system
122           with this option.
123
124

OPERANDS

126       The following operand is supported:
127
128       pkginst
129
130           Specifies  the  package  to be removed. The format pkginst.* can be
131           used to remove all instances of a package.
132
133           The asterisk character (*) is a special character  to  some  shells
134           and  may need to be escaped. In the C-Shell, "*" must be surrounded
135           by single quotes (') or preceded by a backslash (\).
136
137

EXAMPLES

139       Example 1 Removing All Instances of SUNWjunk from client1
140
141
142       The following example removes all instances of SUNWjunk from client1:
143
144
145         example% pkgrm -R /export/root/client1 SUNWjunk*
146
147
148
149
150       Note the caveat on the use of the -R option in the description of  that
151       option, above.
152
153

EXIT STATUS

155       The following exit values are returned:
156
157       0
158
159           Successful completion.
160
161
162       1
163
164           Fatal error.
165
166
167       2
168
169           Warning.
170
171
172       3
173
174           Interruption.
175
176
177       4
178
179           Administration.
180
181
182       10
183
184           Reboot after removal of all packages.
185
186
187       20
188
189           Reboot after removal of this package.
190
191

ATTRIBUTES

193       See attributes(5) for descriptions of the following attributes:
194
195
196
197
198       ┌─────────────────────────────┬─────────────────────────────┐
199       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
200       ├─────────────────────────────┼─────────────────────────────┤
201       │Availability                 │SUNWcsu                      │
202       └─────────────────────────────┴─────────────────────────────┘
203

SEE ALSO

205       pkginfo(1),    pkgmk(1),    pkgparam(1),    pkgproto(1),   pkgtrans(1),
206       installf(1M),   pkgadd(1M),   pkgask(1M),   pkgchk(1M),    removef(1M),
207       admin(4), pkginfo(4), attributes(5), largefile(5)
208
209
210
211

NOTES

213       Package  commands are largefile(5)-aware. They handle files larger than
214       2 GB in the same way they handle smaller files. In their current imple‐
215       mentations,  pkgadd(1M),  pkgtrans(1)  and  other  package commands can
216       process a datastream of  up to 4 GB.
217
218
219
220SunOS 5.11                        30 Oct 2007                        pkgrm(1M)
Impressum