MySQL delete queries can be a sharp tool. Have you tried: go to screen options, set the number of items to be displayed to 1000 say, click the select all box on the table header line, then set the bulk actions dropdown to delete. Don’t want to try it on my site but expect it to work for both products and media.
I’ve tried …
The site ends down
Not tested – use at much risk!
DELETE FROM wp_posts WHERE post_type = “product”
DELETE FROM wp_posts WHERE post_type = “image/jpeg”
You will need backticks around the table and field names. These are stripped out by the forum editor.
There will be related data in the wp_postmeta table. Your database may end up a mess.