The common warthog is best classed as an omnivore, but the great majority of its diet is plant material, and it functions chiefly as a grazer. Short grasses form the staple, especially during the wet season when green growth is abundant. In drier months it relies more on roots, rhizomes, bulbs, and tubers, which it digs up with its snout and tusks.
Other foods include bark, fruit, berries, and fungi. Warthogs occasionally eat invertebrates, eggs, and carrion, and they have been recorded consuming dung, which supplements their intake when preferred foods are scarce. This flexibility helps them persist through seasonal shortages that would challenge a strict grass specialist.
The way a warthog feeds is distinctive. Adults drop onto their front wrists, which are calloused and padded, and shuffle forward on their knees while cropping grass or digging. This posture brings the head close to the ground and suits an animal whose large head and short neck make ordinary bending awkward.