A dirt bag is a sack that has been filled with dirt.
A dirt bag is used to spill dirt on the ground, allowing the tile to be tilled for farming, and preventing further grass from growing.
A dirt bag can have up to 4 tiles of dirt. To fill a dirt bag with more dirt, a shovel must be in the player's main inventory, then a patch of grass or dirt can be right-clicked, followed by using the action "Take some Dirt > Dirt Bag".
A dirt bag cannot be found in the world and can only be obtained by filling a sack with dirt using a shovel. A sack can be filled by right-clicking a patch of grass or dirt with both the sack and a shovel in the player's inventory, and using the action "Take some Dirt > Sack".
From items.txt (Project Zomboid directory/media/scripts/)
Weight = 2,
Type = Drainable,
UseWhileEquipped = FALSE,
UseDelta = 0.25,
DisplayName = Dirt Bag,
Icon = Dirtbag,
ReplaceOnDeplete = EmptyDirtbag,