Audit Trail Module and deletion

Hi everyone, I have an app that uses the Audit Trail module ( and over a few years, the audit logs have grown and I think it is causing me disk space issues (there are around 150000 rows with around 20million assocated rows). Does anyone know how to delete this down?  I have set up a microflow to retrieve all AuditTrail.Log entities, but my app just freezes when I try and delete them.    Thanks
1 answers

If you're talking about such large amounts of data, it's better to delete in batches. You can do this by doing a Custom retrieve with which you always retrieve the data in batches and then delete that part, repeating this until you have deleted the amount of data you want.

To maintain this from now on I would also create a Scheduled event that removes audit trail objects every night that are older than date X for example.