swremove.1m (2010 09)
s
swremove(1M) swremove(1M)
If you have enabled SD’s central management features,
swinstall, swcopy, and swremove provide
enhanced GUIs to support operations on remote machines. See Remote Operations above.
Removing Patches or Patch Rollback Files
To remove patch software, rollback files corresponding to the patch must be available for rollback. You
must remove the base software modified by the patch. (Removing the base software also removes the
patches associated with that software.)
To commit (make permanent) a patch, use the
swmodify command’s patch_commit option to remove
the files saved for patch rollback, or use the
swinstall command’s save_patch_ files option to not save
them initially. See swmodify (1M) and swinstall (1M) for more information.
Control Scripts
When removing installed software, the
swremove command executes several vendor-supplied scripts (if
they exist) during the removal of the software_selections. The
swremove command supports the follow-
ing scripts:
checkremove
a script executed during the analysis of each target_selection, it checks to make sure the remo-
val can be attempted. If this check fails, the software product will not be removed.
preremove
a script executed immediately before the software files are removed.
postremove
a script executed immediately after the software files are removed.
unconfigure
a script executed during the unconfiguration of each target_selection, it unconfigures the host
for the software (and the software for the host). The
preremove and postremove scripts
are not intended for unconfiguration tasks. They are to be used for simple file management
needs such as restoring files moved during install. The unconfigure script allows the
swremove command to unconfigure the hosts on which it has been running before removing
the software specified.
Options
The
swremove supports the following options:
XToolKit Options
The
swremove command supports a subset of the standard X Toolkit options to
control the appearance of the GUI. The supported options are: -bg, -back-
ground, -fg, -foreground, -display, -name, -xrm
, and -synchronous.
See the X(1) manual page for a definition of these options.
-d Operate on a depot rather than installed software.
-r Operates on an alternate root directory, which must be specified in the @
target_selections option. Note that unconfigure scripts are not run when removing
software from an alternate root directory. (This option is not required for alternate
root operations but is maintained for backward compatibility. See the Alternate
Root Directory and Depot Directory heading in sd(5) for more information.)
-i Runs the command in interactive mode (Graphical User Interface). See the Interac-
tive Operation and Remote Operation headings above for additional details.
-p Previews a remove task by running the session through the analysis phase only.
-v Turns on verbose output to stdout. (The swremove log file is not affected by this
option.) Verbose output is controlled by the default verbose=x.
-C session_file Save the current options and operands only to the session_file. You can enter a
relative or absolute path with the file name. The default directory for session files
is $HOME/.sw/sessions/. Without this option, by default, the session file is
saved only in the default directory $HOME/.sw/sessions/.
You can recall a session file with the
-S option.
-f software_file
Read the list of software_selections from software_file instead of (or in addition to)
the command line.
2 Hewlett-Packard Company − 2 − HP-UX 11i Version 3: September 2010