/ Clear

This command is used to remove items and blocks from the player's inventory.

Command logic: /clear [player] [item or block]


Remove a Sword

We will remove an iron sword from the player's inventory.

/clear @p iron_sword
GIF

Remove Stone

We will remove stone from all inventories of all players.

/clear @a stone
GIF