/kill @eIf set, this overrides the selector and entity filter above.
The /kill command removes entities from the world. Use @e[type=!player] to kill all non-player entities safely.
The /kill command instantly removes entities from the world. With the right target selectors it becomes a surgical tool: clear dropped items causing lag, wipe hostile mobs from a build area, or remove a specific named entity without touching yourself, your pets, or your item frames.
On its own, /kill with no arguments kills the player who ran it. Add a target selector and you control exactly what dies: clear thousands of dropped items, remove all mobs except players, or target a single tagged entity across the whole world.
The generator above lets you pick from common presets, kill all mobs, clear items, remove XP orbs, or build custom selectors with entity type filters, distance ranges, name matching, and tags.
| Command | What It Does |
|---|---|
| /kill @s | Kills yourself |
| /kill @e[type=!minecraft:player] | Kills all entities except players |
| /kill @e[type=minecraft:item] | Removes all dropped items |
| /kill @e[type=minecraft:experience_orb] | Removes all XP orbs |
| /kill @e[type=minecraft:zombie] | Kills all zombies |
| /kill @e[type=minecraft:zombie,distance=..50] | Kills zombies within 50 blocks |
| /kill @e[name="Boss"] | Kills entities named "Boss" |
| /kill @e[tag=arena_mob] | Kills entities tagged "arena_mob" |
Warning: /kill @e without a type filter kills everything, including yourself, armor stands, item frames, paintings, and villagers. Always add [type=!minecraft:player] at minimum to protect yourself.
Lag reduction: large farms produce thousands of dropped item and experience_orb entities. Running /kill @e[type=minecraft:item] on a repeating command block timer clears them and reclaims server TPS. Each entity costs a tick of processing, so removing 5,000 items can noticeably improve performance.
Arena reset: for PvP arenas and mob battle maps, tag spawned entities with /tag @e add arena_mob, then clear the arena between rounds with /kill @e[tag=arena_mob]. This leaves player builds, item frames, and other permanent entities untouched.
Distance-based cleanup: use distance=..100 to limit kills to a 100-block radius. This protects builds and mob farms outside the area. Combine with x=, y=, and z= for a fixed center point instead of the command executor position.
Use /kill @e[type=!minecraft:player] to remove all entities except players. This includes hostile mobs, passive mobs, dropped items, XP orbs, projectiles, and vehicles. For just hostile mobs, you need to target specific types individually.
Run /kill @e[type=minecraft:item]. This removes every dropped item entity. For continuous cleanup, place this command in a repeating command block set to "Always Active."
Yes. /kill @e[type=minecraft:ender_dragon] instantly removes the Ender Dragon. Note that it bypasses the normal death animation and may not trigger end gateway generation or the experience drop in some cases.
Add the distance argument to the selector. /kill @e[type=minecraft:zombie,distance=..50] kills every zombie within 50 blocks of the command executor. This protects builds and mob farms outside the area.
Browse more Minecraft tools: