Back in 3rd Edition D&D there was a spell called "Holy Word" that could kill non-good creatures within a 40 foot radius of the caster, if the caster was sufficiently high level relative to the creatures. Good creatures were completely unaffected.
When tightly packed you can fit about 2000 people into a 40-foot-radius circle (total area is 5000 square feet). So one casting can deal with the population of a good-sized town. My gaming group speculated for a while about a society where it was a routine ritual to round up all the peasantry and nuke them with Holy Word to keep the population clear of evil. Never incorporated it into any campaigns, though. It's a bit of a sticky philosophical puzzler.