Skip to content
WikilyWIKILY
All games23 Wikis · pick your game
Commands and cheatsAll commands

Switch game

23 Wikis · pick your game
/kill

Command

/kill

Kills entities: players, mobs and anything else, such as dropped items.

Syntax

/kill [<targets>]

Arguments

ArgumentKind of valueWhat to type
<targets>Target selectorThe entities to kill, as a player name or a target selector. Defaults to whoever runs the command. One or more entities.

Details

Permission level2: operators, worlds with cheats on, command blocks and functions
Works inOperators on multiplayer servers, singleplayer worlds with cheats enabled, and command blocks and functions.
ResultReports "Killed <entity>" or "Killed <number> entities". The number /execute store saves is the number of entities killed.
No targetWithout a target the command kills whoever runs it. It then has to be run by an entity, so a command block or the server console must name a target.
All entity typesA selector such as @e matches every kind of entity, including players, dropped items, Minecarts and Armor Stands. Narrow it with type or distance to avoid removing more than intended.
No matchIf the selector matches nothing, the command fails with "No entity was found".

Examples

/kill

Kills you.

/kill @e[type=minecraft:zombie]

Kills every loaded Zombie.

/kill @e[type=minecraft:item]

Removes every dropped item.

/kill @e[type=minecraft:experience_orb]

Removes every Experience Orb.

/kill @e[type=!minecraft:player,distance=..20]

Kills everything within 20 blocks of you except players.

/kill @e[type=minecraft:creeper,limit=1,sort=nearest]

Kills the nearest Creeper.

Join the creator communityThe people who build the Minecraft Java Edition wiki are on our Discord. Ask questions or suggest pages.Join Discord (opens Discord in a new tab)