Both feral and domestic pigs are opportunistic omnivores, content to eat whatever is provided. Domestic pigs are fed a mix of dry and wet foods by farmers that encourages them to grow very large, but like feral pigs, they can subsist on plant matter, invertebrates, small animals, grains, carrion and acorns.
Feral pigs feed during night and twilight hours but have been witnessed eating during daylight hours as well when it is cold or wet. They often eat agricultural crops and can eat eggs and reptiles. Domestic pigs can eat, among other things, garbage, but farmers raising them for slaughter feed them a mix of soybean and corn meal with additional vitamins and minerals. Traditionally, dairy farmers fed pigs excess milk and leftover whey.
Pigs are primarily foragers with excellent senses of smell, leading to some farmers using them as truffle hunters. However, wild pigs are considered pests or harmful to other wildlife because they compete for resources, accidentally damage crops while rooting, and destabilize wetlands when they wallow in the mud. They do not predate on mammals generally, but given the opportunity, some wild pigs may attack fawns, lambs and kid goats or eat turkey and quail eggs. Some domestic pigs escape and become feral, eating roots, grass, flowers and fruit.