How do I target a specific item on the ground?

I'm making a map and there's a waterfall that keeps spawning squids, I've got a repeating command block that kills the squid but they drop their ink sacks minecraft:dye 0 and it looks messy, What I want is a way to /kill the ink sacks so it looks a little bit cleaner.


You can use the coordinates of the bottom area of the waterfall for that:

/kill @e[type=item,x=?,y=?,z=?,dx=?,dy=?,dz=?]

Replace ? with the coordinates and size of the area.

Or you can just disable mob spawning:

/gamerule doMobSpawning false

Or mob loot dropping:

/gamerule doMobLoot false

If you really want to target it by item type, you can do this:

/kill @e[type=item,nbt={Item:{id:"minecraft:ink_sak"}}]

Note: This is the current syntax, for versions 1.13 and above. "dye" with a data value of 0 was the old way of doing this, that's why the question contains that. You can see the command for 1.12.2 and before in the edit history of this answer.