ForgeRock includes the autoPurgeAuditRecon.js script which can be scheduled/used to purge audit data from your repo. This file can be found in the openidm/bin/defaults/script/audit folder.
You can purge data based on time or based on the past number of events. This file demonstrates how to purge recon data from your logs, but there is no reason why you can’t use it for other log data as well. Just remember to read/know your data retention policies before doing so. ;-)