October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
VGSources
Blog

What Is the Command to Despawn Hostile Mobs in Minecraft?

Minecraft has no single built-in command to remove all hostile mobs. Use /kill with a mob-type selector instead, and check your edition's requirements first.
WorldMinecraft? Length3 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Minecraft has no single built-in command that removes all hostile mobs at once. The practical method is /kill with a target selector for the specific mob type you want gone. In Bedrock Edition, the documented example is /kill @e[type=minecraft:zombie], which targets zombies. Swap in the entity ID for the mob you need. For a world-wide change to hostile spawning, the closest option is /difficulty peaceful, but that changes the whole world rather than cleaning up particular mobs.

Why there is no universal hostile-mob despawn command

Neither Minecraft’s official guide nor Microsoft’s Bedrock command reference documents a command named /despawnhostiles, or a single selector that means “every hostile mob.” Searches for that phrasing usually lead to /kill, which is the command that actually removes entities. Because /kill works on whatever the selector matches, the choice of selector determines the result.

How to remove one mob type with /kill (Bedrock)

Microsoft’s Bedrock reference documents the syntax as /kill [target: target], where the target can be a selector. The reference describes the command as killing entities such as players and mobs. Use it this way:

  1. Make sure cheats are enabled in the world. Bedrock requires this for /kill, and you need the Game Directors permission level to run it.
  2. Open the chat window and type / to begin a command.
  3. Enter the kill command with a type selector, for example /kill @e[type=minecraft:zombie]. Replace minecraft:zombie with the entity ID of the mob you want to remove.
  4. Check the result. Only entities matching the selector should be affected. If you see other mobs disappear, stop and review the selector before running it again.

Repeat the command once for each mob type you want to clear. Avoid /kill @e as a shortcut. It matches every entity the selector covers, which can include players and neutral mobs, not just hostile ones.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Mattel Minecraft Sniffer Action Figure with Game-Accurate Sounds, 3.25-inch Scale Collectible Toy, Pixelated Design
  • The Minecraft 3.25-in scale Sniffer action figure has game-authentic sounds!
  • Press the Sniffer for grunting sounds -then, press and hold for sniffing sounds!
  • The design of the Sniffer -the 2022 Mob Vote winner -stays true to the unique, pixelated world of Minecraft!
  • Adventurous fun for kids who love exploration, creativity, and survival -the Minecraft way!
  • Makes a great toy for video-game players and fans ages 6 years old and up!

Choosing between the options

The three approaches below differ in scope and side effects. The sources reviewed do not establish a single selector that covers all hostile types, so the table shows that gap explicitly.

Approach Scope Side effects Edition and version certainty
/kill with a mob-type selector (e.g. @e[type=minecraft:zombie]) One mob type per command Limited to the selected type Bedrock syntax documented by Microsoft Learn; Java syntax must be checked for your version
/kill @e Every entity the selector matches Can remove players and non-hostile mobs as well Syntax documented in the Bedrock reference, but the selector is too broad for cleanup
/difficulty peaceful Whole world Changes difficulty for all gameplay, not only mob removal Listed as a difficulty argument in Minecraft’s official guide
Single selector for all hostile mobs Would be every hostile type at once Not stated Not stated in the Bedrock reference or Minecraft’s official guide reviewed

Edition and permission requirements

Bedrock Edition

The Bedrock reference states that /kill requires cheats and the Game Directors permission. In single-player, turning on Allow Cheats in a world permanently disables achievement unlocking in that world, even if you later turn cheats off. Plan for this before you use commands in a world where you care about achievements.

Rank #2
Mattel Minecraft Toys, Skeleton Action Figure with Accessory
  • Capture the excitement and adventurous play of Minecraft!
  • Each 3.25-inch scale Minecraft action figure comes with an accessory to recreate favorite in-game moments!
  • Each also includes 1 Redstone Building Piece -- fans can collect the figures and combine all 6 building pieces to build a working TNT Cannon (each sold separately, subject to availability).
  • For even more ways to play and display, the pixelated character figures are posable with movable joints!
  • The collectible figures make a great gift for video-game players and fans ages 6 years old and up, who will want them all! (Each sold separately, subject to availability.) ​

Java Edition

Command access depends on permissions. Minecraft’s official guide says that in single-player you can enable commands in the world settings, and that on a multiplayer server you need a sufficient permission level. Java’s target-selector syntax is not the same as Bedrock’s, so do not copy the Bedrock example unchanged. Check the command reference for your specific Java version before running a selector.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Natural despawning works differently

Mobs that spawn naturally can also disappear on their own when they are far from players. That process is separate from /kill, and the figures below come from Mojang’s Bedrock 1.16.0 release notes (2020). They are historical Bedrock rules, not current behavior for both editions:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Mattel Minecraft Action Figures & Accessories Set, 3.25-inch Scale Collectible Toys with Pixelated Design
  • Capture the excitement and adventurous play of Minecraft
  • Each 3.25-inch scale Minecraft action figure comes with accessories to re-create favorite in-game moments
  • The character figures are posable with movable joints for even more ways to play
  • The designs of the figures and accessories stay true to the unique, pixelated world of Minecraft
  • Makes a great toy for video-game players and fans ages 6 years old and up, who will want them all (Each sold separately, subject to availability.)
  • At simulation distance 4, almost all naturally spawning mobs despawn at 44 blocks or farther from players.
  • At higher simulation distances, the despawn threshold follows the edge of the simulation distance, up to 128 blocks.
  • Fish use a 40-block maximum range.
  • The release notes list exceptions, including bosses and several other mob types.

If you want mobs gone immediately, use a command. Natural despawning cannot be scheduled or targeted by mob type.

Quick Recap

Bestseller No. 1
Mattel Minecraft Sniffer Action Figure with Game-Accurate Sounds, 3.25-inch Scale Collectible Toy, Pixelated Design
Mattel Minecraft Sniffer Action Figure with Game-Accurate Sounds, 3.25-inch Scale Collectible Toy, Pixelated Design
The Minecraft 3.25-in scale Sniffer action figure has game-authentic sounds!; Press the Sniffer for grunting sounds -then, press and hold for sniffing sounds!
$14.32
Bestseller No. 2
Mattel Minecraft Toys, Skeleton Action Figure with Accessory
Mattel Minecraft Toys, Skeleton Action Figure with Accessory
Capture the excitement and adventurous play of Minecraft!
$15.55
SaleBestseller No. 3
Mattel Minecraft Action Figures & Accessories Set, 3.25-inch Scale Collectible Toys with Pixelated Design
Mattel Minecraft Action Figures & Accessories Set, 3.25-inch Scale Collectible Toys with Pixelated Design
Capture the excitement and adventurous play of Minecraft; The character figures are posable with movable joints for even more ways to play
$10.79
Rank #4
Jada Minecraft Nano Metalfigs Series 17 – Die-Cast Figure 12-Pack – Includes Steve, Alex, Diamond Armor Zombie & More Toys
  • Epic Minecraft lineup in your hands; features 12 fan-favorite characters including Steve, Alex, and Snow Golem
  • Die-cast durability meets blocky style; each figure crafted in solid metal with pixel-perfect detailing for display or play
  • Sized for collectors and kids alike; 1.65-inch scale fits easily on shelves, desks, or in toy worlds of their own
  • Ready for creative adventures; includes animals, mobs, and heroes like Glow Squid, Yellow Llama, and Wild Axolotl
  • Jada Toys – official Minecraft partner; trusted for authentic die-cast figures from the world’s biggest brands

What to confirm before you run a command

  • Your edition and version, because selector syntax differs between Bedrock and Java.
  • Whether commands and cheats are enabled for the world or server you are in.
  • The exact entity ID of the mob type you want to remove.
  • Whether the selector matches only the intended entities, particularly if you are working near players or neutral mobs.

“

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How To Create Custom Stickers & Shoutouts In Monster Hunter WildsMonster Hunter WildsBlog20min
  2. How to Get XL Gogoat in Pokemon Legends Z-A (An Extra-Large Gogoat)Pokemon Legends Z-ABlog20min
  3. How to Get Rotting Lightbringer in Diablo 4Diablo 4Blog17min
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.