These snippets will bulk delete all posts/custom posts/comments/revisions from wordpress blog totally, removing them from database. Proceed with caution.
Delete all posts:
Delete all custom posts:
*mind to change “book” to the custom post type name you want to bulk delete
Delete all post revisions:
Delete all spam comments:
Delete all comments:
Read how to delete tags and terms here and images clean up is here.