What Minecraft Command Kills All Mobs: A Practical Guide
Learn the exact Minecraft command to kill all mobs, how it affects items and XP, and safe, targeted alternatives. Includes step-by-step usage, CLI command references, and best practices for backups.

To remove all mobs quickly in a Minecraft world, use the entity-killing command: /kill @e[type=!player]. This kills every non-player entity, including passive animals and hostile mobs, as well as items and experience orbs. For a safer option that excludes players, run the command in a confined area or combine with a radius selector like distance. Craft Guide notes version differences.
What this guide covers and the core concept
This guide centers on the question what minecraft command kills all mobs and explains how entity selectors shape mass-mob management in Minecraft. The core idea is simple: the /kill command targets entities according to a selector, and a broad selector can remove virtually every non-player entity in the world. According to Craft Guide, understanding the selector syntax is the key to safe, predictable results. We’ll walk through practical examples, version nuances, and common pitfalls so you can apply the command with confidence.
# Broad removal of all non-player entities (kills mobs, items, XP orbs, etc.)
/kill @e[type=!player]This example works in recent Minecraft versions, but the exact behavior depends on your edition and server settings. Always test in a controlled environment first and back up your world before executing commands that alter large portions of the world.
type expected
Steps
Estimated time: 15-25 minutes
- 1
Define the scope
Decide whether you want a broad wipe (all non-players) or a targeted cleanup (specific mob types or a radius). Consider the world state and potential consequences on spawning behavior.
Tip: Pro tip: Always backup a copy of the world before mass removal. - 2
Enable cheats or operator rights
Make sure you have permission to run commands. In single-player, cheats must be enabled; on servers, you need OP or a trusted role.
Tip: Test in a separate test world to avoid disrupting a live server. - 3
Choose your command variant
For a quick purge, start with /kill @e[type=!player]. If you need precision, prepare a list of specific mob types or a radius filter.
Tip: Version differences may apply; verify syntax in your Minecraft version's command reference. - 4
Execute the command
Run the command in chat or via a command block/function. Observe the immediate effect and verify the area is cleared as expected.
Tip: If you notice lag, consider running the command in smaller chunks or during low-traffic times. - 5
Assess aftermath and backups
Check mob spawns, item drops, and XP orbs after the kill. If something vital disappeared, restore from backup and refine your approach.
Tip: Keep a reliable backup strategy to recover quickly from accidental removals. - 6
Document and refine
Note which commands you used and under what conditions. Create a reusable function or datapack if you anticipate recurring cleanups.
Tip: Documentation saves time for future maintenance and reduces mistakes.
Prerequisites
Required
- Required
- A world or server with cheats/OP enabledRequired
- Basic knowledge of entity selectors (type, distance)Required
Optional
- World backup strategy before mass modificationsOptional
Commands
| Action | Command |
|---|---|
| Kill all non-player entities (broad)Kills everything except players, including mobs, items, and XP orbs | /kill @e[type=!player] |
| Kill zombies onlyTargets zombie mobs only | /kill @e[type=minecraft:zombie] |
| Kill within a radiusLimits the kill to mobs and other entities within 50 blocks | /kill @e[type=!player,distance=..50] |
| Per-entity execution (version-aware)Executes the kill for each entity individually (1.13+ syntax) | /execute as @e[type=!player] run kill @s |
People Also Ask
Does /kill @e[type=!player] kill players?
No. The selector excludes players, so this command only affects non-player entities. On a server, ensure you have proper permissions and understand the scope before running it.
No, this command excludes players, so players are not killed. Always back up before mass removals.
Will this remove items and XP orbs as well?
Yes. The broad command targets all non-player entities, including items and experience orbs. Use a narrower selector or post-process if you need to preserve loot or XP.
Yes, items and XP orbs are also killed with a broad wipe. Consider tagging mobs or listing specific types if you must preserve loot.
Can I undo a mass-mob kill?
There is no built-in undo for command-driven world changes. Restore from a recent backup to revert unintended removals. Regular backups are essential for this kind of operation.
There’s no undo for mass changes; restore from a backup to recover.
Does this work across Minecraft versions?
The broad /kill syntax works in Minecraft 1.13 and later, but exact behavior and selector rules can vary by version. Always consult the version-specific command reference and test in a safe environment.
Yep, it works in modern versions, but check your version's rules before using it.
How can I target specific mobs only?
Targeting specific mobs requires explicit type selectors (e.g., type=minecraft:zombie). For large sets, enumerate common mob types or use a datapack/function to batch the operation.
Target mobs by listing their types or using a function to run the command on a group.
What about multi-player servers or realms?
On servers and realms, ensure you have operator privileges and coordinate with administrators. Commands can affect all players in the world when run on the server, so perform tests in a dedicated world or on a test server.
On servers, get admin approval and test first in a controlled environment.
The Essentials
- Use /kill @e[type=!player] for a broad mob wipe.
- Players are excluded by the !player filter.
- Items and XP orbs are affected by broad wipes; plan accordingly.
- Tag mobs or enumerate types for targeted removals.
- Back up your world before mass changes.