While working on a WordPress project I needed to delete every post of a specific post type. I thought this little trick was worth sharing.
Run a simple Query to the database to move your
post_type posts to the trash.
UPDATE wp_posts SET `post_status` = 'trash' WHERE post_type = 'my_post_type_here'
Then, go to the post types trash in the WP Admin and click the “Empty Trash” button. Deleting posts this way will be sure WordPress does all the little clean up tasks.
If you have SSH access you can install and use the WP CLI too.