After neglecting one of my websites for a couple month, I decided to do some maintaining and logged in to the site as admin. To my surprise, eventhough the site is "Protected" by mollom as spam protector, I got 132.149 unapproved SPAM comments.

Cool isn't it?

 

Sure you can delete it one by one (oops I mean one page at a time from Drupal standard comment management form) if you are really patient about it and doesn't have anything else to do or install views vbo + views + create admin for ....blah blah blah..... zzz zz zzzzz...... Damn! I just want to nuke all of that spam comments, not wasting my time in deleting it !.

Well don't worry, as long as you got access to phpMyAdmin or mysql command line you can NUKE all the spam node in couple of seconds.

 

So just run this code :

DELETE FROM `comment` WHERE `status` = 0

To delete all rows of comment that is Not Published, in one command. Be careful though, this will wipe any legitimate comments that is still not published. In my case, it is just not worth the time to prune 132.149 Spam comments to retrieve probably at most 10 legitimate comments.