How to kill all mobs in Minecraft
Type /kill @e[type=!minecraft:player] in chat as an operator to remove every entity except players. Use type=minecraft:zombie for one mob type.
kill
Instantly kills players or entities, including players in creative mode.
/kill [<targets>] Examples
/kill @e[type=minecraft:item] Removes all dropped items in loaded chunks.
/kill @e[type=minecraft:zombie,distance=..50] Kills zombies within 50 blocks.
/kill Steve Kills Steve.
Arguments
targetsOptional- Players or entities. Defaults to yourself.
What it does
With no target it kills you. Players drop their items as usual unless keep_inventory is on. Be careful with selectors: @e alone includes every player, so filter by type, for example @e[type=minecraft:item] to clear dropped items or @e[type=!minecraft:player] for everything else.
Good to know
- Needs operator permission level 2.
- From the console, always give a target.
Run it on your server
On a SLASHPLAY server, type it in the Console tab without the leading slash; in game, operators type it in chat with the slash. New to this? Start a Minecraft server first.
Your own
Minecraft server.
From $0.03 an hour, only while it runs. New accounts get 6 free tokens.