Thank you for your answer John,
I would have reset the forums, but I have one forum that is untouched and which I want to keep. It is only one forum that was heavily spammed. I don’t see any way of getting all of the spam posts’ post ID…
Exporting the database and performing the deletion locally sounds like a good option, but it will also require SQL queries, no? Also, is it not possible to write one query that deletes content from two tables (wp_posts and postmeta)?