Did you accidently spawn a million cats? Farm out of control and now need to clean it up?
Sometimes you need to remove a large amount of entities which have taken over your world. Removing one by one can be difficult so here are commands you can type in-game (as an op) or in the console of the control panel
For Minecraft 1.13 or greater (1.14, 1.15, 1.16, 1.17, 1.18)
Kill all sheep:
/kill @e[type=sheep]
Kill all cows:
/kill @e[type=cow]
Kill everything but players:
/kill @e[type=!player]
Kill everything but players and items (like armor stands)
/kill @e[type=!player,type=!item]
Kill everything but players, items, and villagers
/kill @e[type=!player,type=!item,type=!villager]
NOTE: If you are typing the above in the console, type it without the / in the start