======= 05/03/04 13:25:02 MDT END swremove SESSION
Advanced topic: removing superseded patches from a depot
If you have a depot that you are using for patch installation that contains both superseded patches and corresponding superseding patches, the superseded patches will never be installed and are a waste of disk space. There is a patch utility called cleanup that you can use to remove all patches from a software depot if they have been superseded by patches that are also available in the depot. This command works only for directory depots, not tape depots.
The cleanup utility is delivered by the following patches (and their superseding patches):
•PHCO_27779
•PHCO_27780
•PHCO_32220
•Shipped with
To execute cleanup on the depot some_depot, you can use the following command:
cleanup
If you use the
For additional information and command options, see the cleanup(1M) manpage.
The following example shows how to use the cleanup command to remove superseded patches from the depot /my_depots/patch_depot.
•Use the swlist command to show the contents of depot /my_depots/patch_depot. The depot contains two patches: PHCO_24630 and PHCO_27780. The patch PHCO_27780 supersedes PHCO_24630.
$ swlist -l product -d @ /my_depots/patch_depot
#Initializing...
#Contacting target "my_system"...
#
#Target: my_system:/my_depots/patch_depot
PHCO_24630 1.0
•Use the cleanup command in preview mode to see what changes will occur. The command output shows that patch PHCO_24630 will be removed because the cleanup command removes superseded patches; the output states “PHCO_24630 superseded by PHCO_27780”.
$ /usr/sbin/cleanup -p -d /my_depots/patch_depot
###Cleanup program started at 05/04/04 07:48:27 Preview mode enabled. No modifications will be made. Cleanup of depot '/my_depots/patch_depot'. Obtaining the list of patches in the depot:
/my_depots/patch_depot ...done.
Obtaining the list of superseded 11.X patches in the depot: /my_depots/patch_depot ...The following superseded patches exist in the depot:
====================================================
PHCO_24630 superseded by PHCO_27780
All information has been logged to /var/adm/cleanup.log.
###Cleanup program completed at 05/04/04 07:48:27
•Run the cleanup command:
$ /usr/sbin/cleanup -d /my_depots/patch_depot
###Cleanup program started at 05/04/04 07:50:39
Cleanup of depot '/my_depots/patch_depot'. Obtaining the list of patches in the depot:
/my_depots/patch_depot ...done.
76 Using software depots for patch management