
/clear
Removes items from players' inventories. Its basic form is /clear; it has 4 syntax forms and 3 arguments. Permission: Cheats / op 2.
/clear syntax
Game dataEvery 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.
| Argument | Expects | Limits |
|---|---|---|
<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 number | at least 0 |
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.
/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).