Minecraft /clear command

Java EditionBedrock EditionSince 1.4.2

Quick answer: Removes items from inventories. Syntax: /clear [target] [item] [maxCount]

/clear deletes matching items from a player's inventory. With no item specified it wipes the whole inventory; with an item and maxCount it removes only that many.

Syntax

EditionSyntax
Java/clear [target] [item] [maxCount]
Bedrock/clear [player: target] [itemName: Item] [data: int] [maxCount: int]

Targets / arguments: players. Requires: Cheats enabled / operator level 2.

Examples

/clear @s

Empty your entire inventory

/clear @p minecraft:dirt 64

Take up to 64 dirt from the nearest player

/clear Steve minecraft:netherite_sword

Remove every netherite sword Steve holds

Tips

Related commands

/give/kill