The /kill command lets you instantly remove entities from your server. You can target specific entity types, all entities in an area, or use selectors to filter exactly what gets removed.
Running /kill @e without a filter will kill all entities including players. Always use type=!minecraft:player to exclude players, or target a specific entity type.
Command Syntax
The basic syntax is:
/kill <target>
This command can be run from the server console (without the /) or in-game by a player with operator permissions.
Target Selectors
Target selectors let you specify which entities to kill.
| Selector | Description |
|---|---|
@e | All entities |
@e[type=minecraft:zombie] | All entities of a specific type |
@e[type=!minecraft:player] | All entities except players |
@a | All players |
@s | Yourself |
@e[distance=..50] | All entities within 50 blocks of you |
Common Examples
Kill all entities except players:
/kill @e[type=!minecraft:player]
Kill all dropped items:
/kill @e[type=minecraft:item]
Kill all XP orbs:
/kill @e[type=minecraft:experience_orb]
Kill a specific mob type:
/kill @e[type=minecraft:creeper]
Kill entities within a radius:
/kill @e[type=minecraft:zombie,distance=..100]
Kill all hostile mobs in a radius:
/kill @e[type=minecraft:zombie,distance=..100]
/kill @e[type=minecraft:skeleton,distance=..100]
/kill @e[type=minecraft:creeper,distance=..100]
The /kill command is useful for quickly clearing unwanted entities. For long-term solutions to entity-related lag, see How to Reduce Entity Lag on Your Minecraft Server.

Minecraft