NapNodes

← Minecraft guides

Minecraft · updated 29 October 2026

ClearLag and Entity Lag in Minecraft: Find and Clear What's Too Much

When the lag comes from “too much loose stuff” (items on the ground, arrows, experience, piled-up animals), the temptation is to install ClearLag and let it wipe everything every few minutes. It works, but only halfway and with complaints. Here's how to find out what's too much and where, how to clear it by hand and which Paper settings do almost the same without deleting what someone just dropped.

What an entity is and why it lags

In Minecraft, an entity is everything that isn't a block: players, animals, monsters, villagers, items dropped on the ground, experience orbs, arrows, minecarts, armor stands, item frames… The server moves and checks each one many times per second while it's near some player (within the simulation distance).

A few hundred aren't noticeable. The problem is pile-ups: a farm that drops items on the ground without collecting them, a pen with 300 cows, a huge villager hall, thousands of arrows from a skeleton farm. That's when TPS drops for everyone, even if the server has plenty of RAM.

If you don't know yet whether your lag is from entities, start with spark: when this is the culprit, whatever has “entity” in its name weighs heavily in the report.

Rather not set it up yourself? Minecraft servers from €6 a month, no contract and a full refund within 72 hours. Or create a free Minecraft server, no card needed.

Count them: how many and where

Paper has a command that tells you without installing anything. From the console you have to give it the world: paper entity list * minecraft:overworld shows how many entities of each type there are in the main world (minecraft:the_nether and minecraft:the_end for the others). In game, as op, /paper entity list works and looks at the world you're in.

The first number on each line is how many are being simulated right now (near someone); the one in brackets, the ones loaded but idle. What you're looking for is the type that's out of control: minecraft:item (items on the ground), minecraft:experience_orb, minecraft:arrow, a specific animal or minecraft:villager.

With a single type it tells you where: paper entity list minecraft:item minecraft:overworld lists the 10 chunks with the most items and how many each has. The coordinates it gives are chunk coordinates; multiplied by 16 they're block coordinates (chunk 12, -40 starts at block 192, -640). In game, clicking the line takes you there.

Without Paper (Fabric, Forge, NeoForge), the game command execute if entity @e[type=item] tells you how many loose items there are in loaded chunks, without saying where.

Clear them by hand with /kill

kill @e[type=item] deletes every item dropped on the ground in loaded chunks. kill @e[type=experience_orb] does the same with experience and kill @e[type=arrow], with arrows. Whatever is in unloaded chunks (far from everyone) isn't touched.

In game you can limit it to your surroundings: /kill @e[type=item,distance=..64] deletes only the items less than 64 blocks from you. It's the safest way to clean up the farm you found with the previous command without touching the rest of the world.

Never type plain kill @e: it kills every entity, players too, plus pets, villagers, horses and the armor stands and item frames of your builds. If it happens, only a backup fixes it.

Before clearing with people playing, warn them with say (for example, say Clearing items on the ground in 1 minute): someone may have died and be on their way back for their stuff.

What about ClearLag?

ClearLag (and the plugins that copy it) does exactly what the previous section does, but on its own and every few minutes: it warns in chat and deletes items on the ground and, depending on how you configure it, other entities too. That's why it's so well known: you install it and TPS goes up.

The problem is that it treats the symptom. The farm that drops 2,000 items an hour keeps dropping them, and between clears the lag comes back. And it deletes blindly: the stuff of a player who just died, what someone dropped to hand to a friend, sometimes the animals in a pen. It's the most common complaint on servers that use it.

If you still want it, make it one that's up to date for your Minecraft version (many copies of ClearLag haven't been updated in years and break on new versions) and set it to delete only ground items and experience, never named mobs, pets or villagers. Before that, try the settings in the next section: they're often enough.

What Paper already does on its own (and how to tune it)

An item on the ground despawns on its own after 5 minutes (6000 ticks) while its chunk is loaded. On Paper that time, and other things that help with entities, are changed in three files in the server's main folder. They apply on restart. Make a backup first.

spigot.yml, under world-settings → default: item-despawn-rate is the time in ticks an item lasts on the ground (20 ticks are one second); lowering it to 3000 makes it 2 and a half minutes. merge-radius → item (0.5 by default) merges identical items within that distance into a single stack: raising it to 2.5 makes a farm leave far fewer loose entities.

config/paper-world-defaults.yml, under entities → spawning → alt-item-despawn-rate: with enabled: true, the items on the list despawn sooner than the rest. It comes with cobblestone: 300 (15 seconds) and you can add whatever your players drop by the stack (netherrack, dirt, cobbled_deepslate…) without affecting valuable stuff.

In the same file, chunks → entity-per-chunk-save-limit sets a maximum of entities of one type saved per chunk when it unloads (no limit by default). With arrow: 16 or experience_orb: 16, a forgotten farm doesn't pile up thousands of arrows or experience orbs from one session to the next.

The game rule max_entity_cramming (24 by default) is how many mobs fit in one block before they start hurting each other. Lowering it kills squeezed farm animals sooner: useful against pens out of control, but warn your players first. How to change rules, in the gamerules guide.

spigot.yml (world-settings → default)
merge-radius:
  item: 2.5
item-despawn-rate: 3000
config/paper-world-defaults.yml
chunks:
  entity-per-chunk-save-limit:
    arrow: 16
    experience_orb: 16
entities:
  spawning:
    alt-item-despawn-rate:
      enabled: true
      items:
        cobblestone: 300
        netherrack: 300
        dirt: 300

Fixing the cause: farms, pens and villagers

Farms that drop items: make everything end up in hoppers and chests instead of on the ground, or have a water stream carry it to a single hopper. An item inside a chest isn't an entity and costs nothing.

Pens: breeding farms grow without anyone looking. Set a rule (for example, 30 animals per pen) in your server rules and check from time to time with paper entity list.

Villagers: they're among the most expensive entities, because they look for beds, workstations and paths. A trading hall with each villager in its own one-block cell costs much less than 50 villagers wandering around a village.

And if the issue is that the world is big and there are many of you, lowering simulation-distance in server.properties reduces how many entities are simulated around each player; it usually makes more difference than any cleanup plugin.

At NapNodes

Minecraft servers are delivered on Paper in the latest version, so paper entity list and spark are already there: type them in the server's “Console”, without the slash. spigot.yml, bukkit.yml and the config folder are in “Files”; after changing them, “Restart”. Game rules, like max_entity_cramming, can also be changed in “Settings”, with the server on, and they apply to the world, the Nether and the End at once.

If you really want a periodic cleanup without installing anything, in “Advanced settings” → “Schedules” you can create a “Send a message to players” task and, a minute later, a “Run a console command” task with kill @e[type=item], every few hours (the scheduled tasks guide explains how).

The RAM in your plan is yours alone, no overselling: entity lag comes from your world and is fixed on your server, it doesn't depend on other customers. In “Performance” you can see the CPU and memory graphs to check whether the cleanup or the settings helped.

Frequently asked questions

What command clears dropped items in Minecraft?

kill @e[type=item]. It deletes every dropped item in loaded chunks; in game, /kill @e[type=item,distance=..64] only the ones less than 64 blocks from you. Never plain kill @e: it also kills players, pets and villagers.

How long does a dropped item take to despawn?

5 minutes (6000 ticks) while its chunk is loaded. On Paper you change it with item-despawn-rate in spigot.yml, and with alt-item-despawn-rate in paper-world-defaults.yml you can make only cheap items despawn sooner.

Is ClearLag good?

It removes lag for a while because it deletes entities every few minutes, but it doesn't fix the farm producing them and it also deletes what players dropped. First find the cause with paper entity list or spark and tune Paper; if you use it, keep it up to date for your version and have it delete only items and experience.

How do I find the farm that's causing lag?

On Paper, paper entity list minecraft:item minecraft:overworld in the console: it gives you the 10 chunks with the most items. Multiply their coordinates by 16 to get block coordinates, or in game click the line to go there.

Shall we set it up for you?

Minecraft servers from €6 a month, never oversold: your RAM is yours alone. And if you'd rather start without paying, there's a free Minecraft server, no card needed.

Your server doesn't show up in the game? Check it in a second with “Is my Minecraft server online?”: players, version and MOTD, free. Need a player's UUID for the whitelist or permissions? Look it up here. Handing out enchanted items? Build the command with the /give generator.

Keep reading

All Minecraft guides, sorted →