Removing Dynamically Generated Fields After Submission

I have a form where fields are dynamically generated. The number of fields that are generated depend on how many products are in a specific category. There are 6 fields generated per product.
The issue I am having is that every time the form loads, it stores all previously generated fields and so grows astronomically.
Once submitted it sends out notifications, but does not need to otherwise store entries. So the dynamically generated fields can be deleted after each submission.

Is there a function for deleting a field and at what point should it be triggered?

Not exactly what you may be after but a thought… Could you create a hidden field that contains the number of fields generated then use conditional logic to show X fields? Easier to do in sections to show/hide 6 sets of fields at a time.