How to Remove Items from Player Inventories
Learn how to clear specific items or entire inventories from players on your Minecraft server.
Sometimes you need to remove items from players — whether it's a duped item, a banned weapon, or clearing inventories for an event. Here's how to do it.
Using Vanilla Commands
Clear a player's entire inventory
/clear <player>This removes everything from the player's inventory, including armor and offhand.
Clear specific items
/clear <player> <item> <max_count>Examples:
/clear Steve diamond_sword # Remove all diamond swords
/clear Steve diamond 64 # Remove up to 64 diamonds
/clear Steve tnt # Remove all TNTClear items by NBT data
Remove items with specific enchantments or custom data:
/clear Steve diamond_sword{Enchantments:[{id:"minecraft:sharpness",lvl:10}]}Using EssentialsX
If you have EssentialsX installed:
| Command | Description |
|---|---|
/clearinventory <player> | Clear entire inventory |
/ci <player> | Short form |
/remove <item> | Remove item type from nearby ground |
Removing Items Server-Wide
Remove dropped items from the ground
/kill @e[type=item]This removes all dropped item entities. Useful for clearing lag from item farms or duplication exploits.
Remove specific dropped items
/kill @e[type=item,nbt={Item:{id:"minecraft:diamond"}}]Remove items from all players
To clear a specific item from every online player:
/clear @a <item>Using Plugins for Advanced Management
ClearLag
ClearLag can automatically remove ground items on a timer:
/lagg clear # Remove ground items
/lagg killmobs # Remove mobsCoreProtect
If you need to track where duped items came from, use CoreProtect to inspect item transactions:
/co inspect # Toggle inspect mode
/co rollback u:<player> t:1h a:+container # Roll back container actionsCommon Scenarios
Removing duped items
- Identify the duped item and affected players
- Use
/clear <player> <item>on each player - Fix the dupe exploit (update server, patch plugin, etc.)
- Check player ender chests — dupers often stash items there
Pre-event inventory wipe
For events that require clean inventories:
/clear @a # Clear all inventories
/effect clear @a # Remove all effects
/xp set @a 0 levels # Reset XP
/gamemode adventure @a # Set gamemode⚠️ Warning: The
/clearcommand is irreversible. Always backup before mass-clearing inventories. Consider notifying players first.
💡 Tip: For scheduled item cleanup (reducing lag from ground items), set up ClearLag instead of manually running commands.
See also: ClearLag | Edit Player Data | Ban/Unban Players
If you need help, join our Discord.
How is this guide?
