Dung beetles provide important ecosystem functions in semiarid environments, improving the physiochemical characteristics of the soil through tunnelling and burying nutrient-rich dung. In sub-Saharan Africa, diverse indigenous mammal communities support highly abundant dung beetle populations in savannah ecosystems. However, the conversion of landscapes to livestock agriculture may result in changes in the abundance and diversity of wild mammal species. This is likely to have significant impacts on dung beetle communities, particularly because domestic livestock dung may be contaminated with toxic residues of veterinary parasiticides. The environmental impact is likely to be affected by the degree of niche overlap between the beetle communities that colonize cattle dung and those that colonize the dung of wild mammals. We compared dung beetle communities between a pristine national park habitat dominated by large wild herbivores, and a pastoral farming community dominated by domestic livestock. Diurnal dung beetles were attracted to cattle dung in greater abundance and diversity compared to elephant, zebra or giraffe dung. Nocturnal/crepuscular dung beetles were attracted to non-ruminant dung (elephant and zebra) in higher abundance compared to ruminant dung (cattle and giraffe). Although there were no clear trophic specializations, three diurnal species showed an association with cattle dung, whereas eight nocturnal/crepuscular species showed an association with non-ruminant (elephant and zebra) dung. Diurnal species may be at greater risk from the toxic effects of residues of veterinary parasiticides in domestic livestock dung. Although many species showed trophic associations with wild herbivore dung, these beetles can utilize a wide range of dung and will readily colonize cattle dung in the absence of other options. As more land is converted to livestock agriculture, the contamination of dung with toxic residues from veterinary parasiticides could therefore negatively impact the majority of dung beetle species.