/clear

Cheats / op 2Java 26.3

Removes items from players' inventories. Its basic form is /clear; it has 4 syntax forms and 3 arguments. Permission: Cheats / op 2.

Who can use it
Cheats / op 2
Syntax forms
4
Arguments
3

/clear syntax

Game data

Every form the game accepts. Words in <angle brackets> are arguments you fill in; everything else is typed as is.

/clear
/clear <targets>
/clear <targets> <item>
/clear <targets> <item> <maxCount>

/clear examples

Ready-to-paste examples (cheats on). @s is you, @p the nearest player, @a everyone, @e every entity.

/clear @s
Empties your whole inventory.
/clear @s minecraft:dirt
Removes only your dirt.

/clear arguments

What each argument expects, with the limits the game enforces.

/clear arguments
ArgumentExpectsLimits
<targets>Target selector or player name (@s, @p, @a, @e, @r)players only · one or more
<item>Item ID or #tag, with optional components—
<maxCount>Whole numberat least 0

Related commands

Data: Minecraft Java Edition 26.3 game files. How we source this

Removes items from players' inventories. It has 4 syntax forms and can be run by: Cheats / op 2.

See Also

🔍

Help us maintain accuracy! If you notice incorrect stats, missing data, or any issues, your feedback directly improves the quality of our data for the entire community.

Report an Issue

/clear FAQ (Java 26.3)

What does /clear do in Minecraft?

Removes items from players' inventories.

What is the syntax of /clear?

The basic form is /clear. All forms are listed above.

What is an example of /clear?

/clear @s — Empties your whole inventory.

Do you need cheats for /clear?

Yes: Cheats / op 2. In singleplayer turn on Allow Cheats (or open to LAN with cheats).