Skip to content

clear Minecraft command

The clear command in Minecraft is a useful tool for removing items from your inventory or a specific player’s inventory. This command can help you quickly clear out unwanted items, organize your inventory, or manage players in a multiplayer setting. By specifying the target player or inventory slot, you can easily remove specific items or clear out entire inventories with just a few simple commands. Mastering the clear command can streamline your gameplay and make managing your inventory much more efficient.

clear Syntax:

Terminal window
/clear [player] [item] [data] [maxCount] [dataTag]

clear Options:

OptionDescription
playerSpecifies the target player
itemSpecifies the item to be cleared
dataSpecifies the item’s data value
maxCountSpecifies the maximum count to clear
dataTagSpecifies additional data in the item to be cleared

clear Command Usage Examples:

Clear a Specific Player’s Inventory

Terminal window
clear Jack

Removes all items from the inventory of the player named “Jack”.

Clear All Items From Your Inventory

Terminal window
clear @s

Clears all items from your own inventory.

Clear a Specific Item From a Player’s Inventory

Terminal window
clear Jack diamond_sword

Removes all Diamond Swords from the inventory of the player named “Jack”.

Clear All Items in a Specific Slot of a Player’s Inventory

Terminal window
clear Jack minecraft:diamond 0

Clears all Diamonds from slot 0 of the inventory of the player named “Jack”.

Clear All Items in a Specific Slot From Your Inventory

Terminal window
clear @s minecraft:iron_ingot 5

Removes all Iron Ingots from slot 5 of your inventory.

How do I use clear in Minecraft?

To use the clear command in console, execute the following command:

Terminal window
clear --all

What does the clear command do in Minecraft?

The clear command in Minecraft removes specified items from the player’s inventory or clears the entire inventory.

Terminal window
clear --item diamond

How can I clear a specific item type in Minecraft?

You can use the clear command with the —item option followed by the item type to remove that specific item from your inventory.

Terminal window
clear --item iron_sword

Can I clear a specific quantity of items in Minecraft?

Yes, you can specify the quantity of items to clear by using the —count option in the clear command.

Terminal window
clear --item apple --count 10

How do I clear all items from my inventory in Minecraft?

To clear all items from your inventory in Minecraft, use the clear command with the —all option.

Terminal window
clear --all

Is there a way to clear items from a specific slot in Minecraft?

Yes, you can clear items from a specific slot in your inventory by using the —slot option with the clear command.

Terminal window
clear --slot 0

What happens if I use the clear command without any options in Minecraft?

If you use the clear command without specifying any options, it will clear all items from your inventory by default.

Terminal window
clear

Can I use the clear command to clear items from a player’s inventory in Minecraft?

Yes, you can use the clear command with the player’s name to clear items from a specific player’s inventory.

Terminal window
clear --player Steve

Applications of the clear command

  • Removing all items from a player’s inventory
  • Clearing all items from a container
  • Quick removal of items from the game world without destroying them