A solution to delete a group of members at once?

I have a lot of members, I mean here are thousands of members, so I can't delete them one by one. I want a way to delete these except for some only