Deleting users directly from database is not a good idea. either done through drush or by interacting directly with the database through SQL DELETE
. Some modules, for instance, create robot users and these tend to be blocked. Just deleting them may interfere with the module's operation and even make the module fail, leaving you with orphaned data and inexplicable error messages.
When spam registrations appear as "blocked" users, they're blocked because their accounts remain unverified (spammers, as a rule, never verify, so their accounts never progress from the blocked status).
A project named LoginToboggan gives you the option to have unvalidated users purged from the system at a pre-defined interval. This will also take care of any spammers that register in the future, without making it necessary to introduce protective measures such as CAPTCHA, that tend to discourage legitimate users from signing up.
Using LoginToboggan to bulk-remove spam users is much safer and more robust than hacking the database yourself.
If you don't want to install a module to do this, as an alternative, you can delete the unverified users using drush and user_delete()
.