If you're having problems with lag or just want to kill all the mobs around you, clear off items from the ground, kill players around you, or for any purpose, you'll want to use the kill command. There is a lot you can do with this command, and it's too much to cover in one guide, so we've simplified it down to the most popular examples.
/kill playername
Example:
/kill @e[type=cow]
Example:
/kill @e[type=!player]
Example:
/kill
Example:
Those are some of the common ways to use the kill command for any purpose. Make sure to check out our guide on how to run commands so you can learn how to run them on your server.