Although there is growing demand for animal products in Africa, production is stagnating. Appropriate management of livestock diversity could help reinvigorate production, contribute to food security and improve farmers' livelihoods, particularly in subsistence-oriented systems. We assess differences in farmers' preferences and economic values for pig traits across different production systems and across areas that have been affected and unaffected by classical swine fever (CSF). Not surprisingly, market-oriented farmers derived higher values from the productive traits such as heavy slaughter weight and large litter size found in exotic pig genotypes. Subsistence-oriented farmers, particularly in swine fever affected areas, placed high value on tolerance to disease. We found that CSF changed farmers' preferences for adaptive traits, and less so for productive traits. Therefore, indigenous breeds become more valuable for subsistence farmers and crossbreeds for market-oriented farmers if CSF is a risk. Our results can have implications for breeding and conservation strategies and for compensation strategies after culling, and will become increasingly relevant if, as predicted, heat waves and disease outbreaks become more frequent in pig production systems in South Africa with climate change.