The easiest way to get rid of all the test data is to download the form/flow to your disk (so you have the backup), then delete the form/flow from your designer account. This will delete all tasks and submissions that were made while you were testing the form/flow. Now upload the form/flow again from your disk so you will have a fresh copy of the form/flow that you can share with your users in production.
If you cannot delete the form/flow, then you can abort those task that you don’t wish to process. Please see this documentation which explains how to abort the tasks.