HP-UX HB v13.00 Ch-05 - SD-UX

HP-UX Handbook Rev 13.00 Page 16 (of 49)
Chapter 05 Software Distributor (SD-UX)
October 29, 2013
do
swcopy -s $PATCHDEPOT \* @ /hub/patches
done
swremove Command
The swremove command deletes software that has been installed on your system. It also removes
software from depots.
You might occasionally want to remove a patch and restore the system to its prepatched state.
This process is known as patch rollback. For example, if you installed a patch that resulted in
unacceptable system behavior, you might choose to roll back this patch. However, rollback is
possible only if certain files were saved as part of the patch installation process. During patch
installation, the default behavior is to save copies of all files that are replaced by the new patch
before the new versions of these files are loaded. These saved files are called rollback files and
are the key to making patch rollback possible. When you roll back a patch, these rollback files
are restored to the system. You should override the default behavior only if you have a complete
understanding of the patch rollback process.
You cannot roll back a patch unless one of the following is true:
• Rollback files corresponding to the patch are available for reinstallation.
• Base software and the patch that modifies the software are removed at the same time
(removing the base software also removes the patches associated with that software).
• For superseded patches, you must first roll back the superseding patch.
You can use the swremove command to roll back a patch (if no dependencies exist for the patch).
Use the following command to roll back the patch patch_id:
swremove patch_id
As is true for many SD-UX commands, you can add the -p option to execute the command in
preview-only mode. This mode allows you to view output from the command without actual
changes occurring. You should initially execute the command in preview mode:
swremove -p patch_id
Advanced topic: patch installation and rollback files When installing patches, you can explicitly
specify that rollback files not be saved. To do this,
you add the -x patch_save_files=false option to the swinstall command: