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

How to Use the /clear Command in Minecraft (Java and Bedrock)

Use Minecraft’s /clear command to remove all items or filter by player and item. Compare Java and Bedrock syntax, permissions, and examples.
WorldMinecraft Length3 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use /clear to remove items from a player’s inventory. Open chat or the command input, enter the command with a leading slash, and use the syntax for your edition: Java and Bedrock place some arguments differently. For Bedrock, Microsoft’s command reference says cheats are required; in any edition, commands must be enabled and you need sufficient permissions.

Before you use /clear

Open chat or the command input and type the command with a leading slash. Minecraft’s official command guide explains command entry and Tab autocomplete, which can help you cycle through arguments available in your game.

If the command is rejected, check that commands are enabled in the world settings and that you have permission to use them. On a multiplayer server or Realm you do not control, ask its owner or administrator. Microsoft’s Bedrock command reference specifically marks /clear as requiring cheats and Game Directors permission.

Use /clear in Java Edition

The Java syntax documented by the community-maintained Minecraft Wiki command reference is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Minecraft | Java & Bedrock Deluxe Collection | Windows Digital Code
  • DELUXE COLLECTION — Includes Minecraft: Java & Bedrock Edition, three Bedrock add-ons, three exclusive Character Creator items, and 700 Minecoins.
  • CREATE YOUR WORLD — Build whatever you imagine in an infinite world that’s unique in every playthrough.
  • EXPLORE AND CRAFT — Discover biomes, resources, and mobs, then craft your way through a sandbox world filled with surprises.
  • SURVIVE THE ADVENTURE — Face mysterious foes, travel across exciting landscapes, and venture into perilous dimensions.
  • PLAY TOGETHER — Play cross-platform with friends in Bedrock Edition on console, mobile, and PC, or join community servers in Java Edition on PC, Mac, and Linux. Online console multiplayer requires a platform-specific subscription (sold separately).

/clear [<targets>] [<item>] [<maxCount>]

  • targets selects the player or players. Use @s for the player executing the command.
  • item limits removal to a matching item. For example, minecraft:stone.
  • maxCount limits how many matching items are removed.

Examples:

  • Clear the executing player’s inventory: /clear @s
  • Remove matching stone from the executing player: /clear @s minecraft:stone
  • Remove up to five matching stone items: /clear @s minecraft:stone 5

The reference describes a count of 0 as a way to query or detect the matching count without removing items. Because advanced matching and command behavior can vary by version, verify the syntax with in-game help or autocomplete before relying on it in command-block logic.

Use /clear in Bedrock Edition

Microsoft documents this syntax for Bedrock:

/clear [player: target] [itemName: Item] [data: int] [maxCount: int]

Rank #2
Minecraft | Java & Bedrock Ultimate Collection | Windows Digital Code
  • ULTIMATE COLLECTION — Includes Minecraft: Java & Bedrock Edition, five Bedrock add-ons, five exclusive Character Creator items, and 1000 Minecoins.
  • CREATE YOUR WORLD — Build whatever you imagine in an infinite world that’s unique in every playthrough.
  • EXPLORE AND CRAFT — Discover biomes, resources, and mobs, then craft your way through a sandbox world filled with surprises.
  • SURVIVE THE ADVENTURE — Face mysterious foes, travel across exciting landscapes, and venture into perilous dimensions.
  • PLAY TOGETHER — Play cross-platform with friends in Bedrock Edition on console, mobile, and PC, or join community servers in Java Edition on PC, Mac, and Linux. Online console multiplayer requires a platform-specific subscription (sold separately).
  • player accepts a player name or target selector.
  • itemName identifies the item to clear. Omit it to clear all items.
  • data is an item ID/data value; it defaults to -1 when omitted.
  • maxCount sets the maximum quantity; it defaults to -1.

For example, to target yourself and specify an item, start with /clear @s followed by the Bedrock item name. To target someone else, use their player name or a selector accepted by your game. Use autocomplete to confirm the item name and argument positions. In particular, Bedrock places data before maxCount, so do not copy a Java limited-count command unchanged.

Java and Bedrock syntax at a glance

Edition Documented syntax Item filter and count Permission note
Java /clear [<targets>] [<item>] [<maxCount>] Item follows target; maximum count follows item. The cited community reference describes a zero count as a query/detection behavior. Commands must be enabled and you need sufficient permissions; check the game or server settings.
Bedrock /clear [player: target] [itemName: Item] [data: int] [maxCount: int] Item name is followed by data and then maximum count. Microsoft documents omitted item as clearing all items. Microsoft’s reference marks cheats required and lists Game Directors permission.

The Java form and advanced behavior above come from a community-maintained reference, while Microsoft’s Learn page is the official source for Bedrock syntax and its permission requirement. Exact command support can depend on your game version; use the in-game command help when autocomplete or a command error conflicts with these forms.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Minecraft - Bedrock Edition PS4
  • Play and share with friends on console, mobile and Windows 10
  • discover community creations in the new in-game store
  • access new mini games and game modes through servers
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What /clear does—and does not do

/clear removes items from a player’s inventory; it is not the same as dropping items manually. It is also different from /weather clear: in that command, clear is the weather setting, not an inventory action, as shown in Minecraft’s command guide.

If an item remains or the command behaves unexpectedly, note your edition and version before troubleshooting. Behavior involving cursor-held items, crafting slots, and every item-component predicate is not established here for all current releases, so avoid assuming those cases work identically across Java and Bedrock.

Best Value
Sale
Ravensburger 21580 Minecraft Explorers - Cooperative Card Game for 2-4 People Ages 8 and up
  • The cooperative Minecraft card game invites 2-4 players aged 8 and up to explore the picturesque landscapes of Minecraft and search for hidden treasures
  • Experience Minecraft as a new, exciting adventure and fill your chests with treasures before you are caught by the monsters
  • Only if you work well as a team and combine luck with strategy can you win the game together.
  • The card game for 2-4 people is entertaining and varied, lots of fun and perfect for taking with you thanks to its practical travel format.
  • The card game is perfect for every family or friends game night and a great gift for all small and big fans of Minecraft.
Rank #4
Ravensburger Minecraft Heroes of The Village | Cooperative Board Game | Exciting & Unpredictable | Perfect for Families and Minecraft Enthusiasts | Suitable for Kids & Adults
  • ENGAGING AND COOPERATIVE: Experience the thrill of Minecraft in a unique and cooperative board game format. Perfect for teams of 2 to 4 players, the game encourages joint strategies and shared victories
  • EVER-CHANGING GAMEPLAY: With a map that changes every time you play, this game offers high replay value, making every game a unique and unpredictable experience
  • QUALITY COMPONENTS: The game includes 25 wooden blocks, 18 world tiles, 4 inventory boards, 6 player cards, 9 buildings, 12 mob tokens and more. All components are crafted with care to enhance your gaming experience
  • AGE-APPROPRIATE CHALLENGE: Aimed at ages 7 and up, this game offers a great balance of fun and challenge, making it a great choice for family game nights, parties, or gatherings
  • TRUSTED BRAND: With over 130 years of experience, Ravensburger ensures top quality games that stimulate the mind, engage the hands, and touch the heart

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 *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

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
Windows Errors? Fix Them Before They SpreadFree repair scan

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.