To get rid of corpses in Project Zomboid you can use a dumpster rubbish bin, it can also be used to delete items, remove trash and clean up your base.
Get a Dumpster
A trash can is great for deleting trash however its not big enough to fit a corpse. Instead go and find a dumpster. They can be picked up with Carpentry (2) and a crowbar, then transported to your base and placed down.
Once you have your own private dumpster you can place zombie corpse inside and hit the “Delete All” button to make them disappear.
Graves and Fire
You can also use a shovel, dig a grave and bury the corpses. You can only bury 5 in a grave, so you’re probably going to end up with a bunch of ugly mounds of dirt everywhere.
Alternatively you can use fire. Fire is dangerous, you might burn down your base or even get yourself killed. But if there are a huge number of corpses this is the best way.
You can make a camp fire and toss the bodies onto it. Or use a gas can and lighter to directly burn the corpses (just equip the items and right click the corpses and select “burn corpse”).