How to kill all entities in Minecraft Bedrock Edition

Mobs underground in caves, taking up some of the mob cap (Image via Minecraft)
Mobs underground in caves, taking up some of the mob cap (Image via Minecraft)

Minecraft has a lot of mobs. There are dozens of animals, neutral mobs, and hostile mobs scattered across the world.

Given that due to how mobs can spawn, the caves beneath the players' base and in the surrounding chunks can slowly fill up with mobs, there is a need to occasionally clear out the world.

Mobs that fill these caves can often take up valuable room in the mob cap and increase the amount of logic the game has to simulate.

This means that killing these mobs is essential to running farms and just keeping their general performance as good as possible.


How to remove all entities in Minecraft Bedrock

The /kill command

An example of a player using the /kill @e command (Image via Minecraft)
An example of a player using the /kill @e command (Image via Minecraft)

The most brute force method to kill all entities for Bedrock players. The basic version of this command will kill the player that uses it. However, if the player changes the command to:

/kill @e

The command will instead kill and delete all entities. This command has no considerations for players or drops. This command will kill all entities, the player included, and delete all the items that mobs would typically drop.

This will remove all the entities that could potentially be causing issues for a player’s performance, but since the command also kills the player, it is far from the most elegant solution.


The type qualifier

Using the targeted kill command to kill all mobs other than the player (Image via Minecraft)
Using the targeted kill command to kill all mobs other than the player (Image via Minecraft)

For players looking for a way to clear the mob cap that will not result in their own demise, there is a way to change the /kill @e command to avoid hitting the player. This is done by adding the type qualifier to the command. This will cause the command to seek a specific type of entity to kill.

However, an astute player might wonder how the type qualifier can be used to avoid the player if it explicitly changes the command to only affect certain types of mobs.

This could quickly become a large, messy command, trying to name all kinds of entities other than the player. But thankfully, Mojang has accounted for this.

Similar to programming languages, which can use an exclamation mark as a signifier for "not", the type qualifier also allows for this syntax. That means that players can add the following clause to the /kill @e command to kill everything except for the player:

/kill @e[type=!player]

This will tell the command to kill every entity near the player and delete any items that drop, as well, while leaving the player alive.

Quick Links

App download animated image Get the free App now