I used The following:

/clear @p (id of item ex:1) 8

I wanted to remove only a certain amount of items. Any ideas on how to remove only a few items rather than all of them?

Note: I am using 1.7.10 because I'm using a modpack.


So the syntax of the command is:

clear [player] [item] [data] [max-count] [dataTag]

So if you wanted to clear your own inventory you would say:


If you wanted to clear rappatic's inventory:

/clear rappatic

If you wanted to clear rappatic's inventory of stone blocks:

/clear rappatic minecraft:stone

If you wanted to clear rappatic's inventory of blue wool (here for data values)

/clear rappatic minecraft:wool 11

or for all types of wool:

/clear rappatic minecraft:wool -1

To clear rappatic's inventory of 12 stone blocks:

/clear rappatic minecraft:stone 1 12

From the minecraft wiki:

clear [player] [item] [data] [maxCount] [dataTag] 

For example: clear @p 1 -1 64 will remove all kinds of stone up to a stack (-1 in data means match only itemID, so stone, granite, diorite, etc will be removed).

  • 2
    /clear did not support a maximum amount (or even a data value) in 1.7.10. – Skylinerw Apr 2 '16 at 16:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.