Original: Captivity can be used as a generalizing term to describe the keeping  of either domesticated animals (livestock and pets) or wild animals.
Simplified: Captivity can be used as a term meaning the keeping of either domesticated animals (livestock, pets) or wild animals.