Want to remove all trackback spam from the multisite

I am looking for a way to remove all the spam on our multisite in one fell swoop. The problem is that for a long time we had the option to allow trackbacks and pings on our site and we did disable that function some time ago but we still Have about 70000 spam trackbacks on posts and such.

And going through all our sites and manually deleting that amount is no fun so I thought you could help me find a better way :slight_smile:

After searching some on the internet I found that you could maybe do something like this in the MySQL database.

DELETE FROM wp_comments WHERE comment_type="trackback"

But since we almost have 50 blogs. Can you easily modify the command to make it go through all of them? Maybe something like:

DELETE FROM wp_*_comments WHERE comment_type="trackback"