Heisenbug: can't delete user without post in rapid succession of deleting users without posts

I’m deleting a bunch of spammers manually since there’s no batch mode for user operations: from the Users search results table with emails shown, I ctrl+click on the spammers to open them in new tabs, about 15 at a time. Then I go to each tab, click Delete User → Delete only, and move to the next tab.

About one in 10 to 15 times, I get this error:

If I click OK and Delete again, the deletion succeeds.

Much more often (~25% of the cases), I get

: - (
Error
while trying to load
Something went wrong.

which I assume is due to load on the server? I use a 1GB VPS and there are no active users.

Why do you have so many spammers? Is this an import issue? Did you install the Akismet plugin?

It’s an import issue from MyBB. The search by email feature in MyBB is crappy and finds nothing for, for example, “freemail.hu”. I ran an import a few months ago, and even though since I’ve cleaned up more of the MyBB userbase, running the import again preserves users imported back then. In the meantime there has been activity in the Staff category, so I can’t wipe out the DB and import from scratch.

I’d be happy if there were a utility script I could tweak, that allowed simple batch operations on users, such as deleting users if their email matches a given domain.