Eliminating mobs in Minecraft can be necessary for various reasons. The simplest method involves using the `/kill` command, but its application requires understanding specific syntax. This guide explains how to effectively use this command to target and remove mobs.
Before proceeding, ensure your Minecraft world is set up with cheats enabled. Instructions on how to enable cheats are provided later in this guide.
The basic `/kill` command, when entered alone (/kill), targets the player. To target mobs, you must add specific parameters. To kill all mobs (excluding the player):
/kill @e[type=!minecraft:player]
Here, `@e` selects all entities, and `[type=!minecraft:player]` excludes the player.
For more targeted mob elimination, specify the mob type:
/kill @e[type=minecraft:chicken]
(kills all chickens)
You can also specify the kill radius. To kill all mobs within a 15-block radius:
/kill @e[distance=..15]
– Java Edition
/kill @e[r=10]
– Bedrock Edition
To kill a specific mob type within a radius:
/kill @e[distance=..15,type=minecraft:sheep]
– Java Edition
/kill @e[r=10,type=minecraft:sheep]
– Bedrock Edition
Minecraft will autocomplete commands, simplifying the process. Experimentation will quickly familiarize you with the command's functionality.
Beyond `@e`, other useful selectors exist:
@p
– nearest player@r
– random player@a
– all players@s
– yourself
Enabling Cheats/Commands in Minecraft
The mob-killing commands require a world with cheats enabled. Here's how to enable them:
Java Edition
In your world, press Esc, select "Open to LAN," and enable "Allow Commands." This setting is temporary and must be re-enabled each time you start the world. To permanently enable cheats, create a new world copy with cheats enabled via the "Re-create" option in the singleplayer world menu.
Bedrock Edition
In your world's settings menu, toggle the "Cheats" option to "On."
Minecraft is available on PlayStation, Xbox, Nintendo Switch, PC, and mobile devices.