One approach to deleting spammy user accounts from WordPress is to launch phpMyAdmin or something similar. If the website in question isn’t really a multi user site, it should be easy to collect actual/real user accounts and export them from database. Then the database table could be truncated and previously exported data could then be imported.
Idea: removing by suspicious email address
DELETE FROM `wp_users` WHERE `user_email` LIKE '%@yahoo.com%';
This code example removes from a database table
wp_users those rows that have a matching part
@yahoo.com in the field where email address is stored.
Idea: removing by incremental number (ID)
DELETE FROM `wp_users` WHERE `ID` > 5 AND `ID` < 5000;
The code above will attempt to remove rows from
wp_users table where the field
ID has larger value than 5 and smaller than 5000.