How do you kill all the entities that enter a certain radius except for villagers and players? [duplicate]
Solution 1:
execute @e[type=!player,x=,y=,z=,r=] ~ ~ ~ kill @s[type=!villager]
Just add the coordinates and the radius you need in the first target selector.