If all of the batches need to be deleted, how about recording a macro? [I read a post earlier today about macros being old technology, but they are really great for projects like this. ]
To do this: Navigate to the first batch in the Inventory Batch window, start the macro, click Delete and respond to delete messages. Then click the far left browse button to get to the new first batch and repeat this process for 5 or so batches making sure you end up with a batch showing on the window. Then, stop the macro. You can then start the macro to delete the next five batches. To make it even better, add the macro to the Navigation Pane and assign a keystroke to it so it is just one keystroke to run it.
WARNING: Make certain you don't have any "good" batches out there as it is easy to run the macro so many times that you end up deleting good batches.
If you are comfortable with SQL queries and the GP tables, you could do it that way, but macros ensure you are working through the GP business layer.