You can use the AUTO_DEL_REC_OBJ database configuration parameter and the PRUNE HISTORY command or the db2Prune API to delete recovery objects.
When you invoke the PRUNE HISTORY command, or call the db2Prune API, the IBM® Data Server database manager does the following:
Prunes entries from the recovery history file that do not have the status DB2HISTORY_STATUS_DO_NOT_DEL
When you invoke the PRUNE HISTORY command with the AND DELETE parameter, or when you call the db2Prune API with the DB2PRUNE_OPTION_DELETE flag, the database manager does the following:
Prunes entries from the recovery history file that are older than a timestamp you specify and that do not have the status DB2HISTORY_STATUS_DO_NOT_DEL
Deletes the physical log files associated with the pruned entries
If you set the AUTO_DEL_REC_OBJ database configuration parameter to ON, then when you invoke the PRUNE HISTORY command with the AND DELETE parameter, or when you call the db2Prune API with the DB2PRUNE_OPTION_DELETE flag, the database manager does the following:
Prunes entries from the recovery history file that do not have the status DB2HISTORY_STATUS_DO_NOT_DEL
Deletes the physical log files associated with the pruned entries
Deletes the backup images associated with the pruned entries
Deletes the load copy images associated with the pruned entries
To delete unneeded recovery objects: