rm-patchdata is a perl script that will remove stale patch data.

The files removed are:

	/var/sadm/pkg/SUNWxx.<n> files installed by a patch (with pkgrm).
	/var/sadm/patch/<patchid>


Usage:  rm-patchdata [-r] [-f] [patch-id ...]

	-r Really remove.  The default is print actions that will be taken.
	-f Remove patches with saved files too.  The default is not
	   to remove patches that can be backed out.

Optionally, rm-patchdata will remove all revisions of a specified patchid.
Note, if you specify a patch-id, *all* revisions of a patch will be removed,
including newer revisions.  E.g., rm-patchdata 101318-12 will also remove
101318-50.

The default mode of operation is inspecting all pkginfo files and
looking for SUNW_PATCHIDs (to determine which patches have been installed)
and SUNW_OBSOLETES (to determine which patches ave been obsoleted).
It will then mark all revisions lower than the highest one found 
(in SUNW_PATCHID lines) as obsolete.  It will also mark obsolete all
revisions of patches found in the SUNW_OBSOLETES line.

One usage of rm-patchdata is reinstalling an earlier version of a patch
on a system that hasn't had the old files saved.

E.g., if you wish to backout 101318-50 and re-install 101318-45,
you would do something like:

	rm-patchdata -r 101318-50  # Note: also removes all other
				     obsolete patchdata.

and proceed with installing 101318-45

It should be noted that files added to latest release that are not in the
release to be reinstalled will not be backed out and will remain those
of the newest patch version.

Casper Dik (casper@fwi.uva.nl)

