Eukaryotic cells can die from physical trauma, which results in necrosis. Alternatively, they can die through programmed cell death upon the stimulation of specific signalling pathways. In this Review, we discuss the role of different cell death pathways in innate immune defence against bacterial and viral infection: apoptosis, necroptosis, pyroptosis and NETosis. We describe the interactions that interweave different programmed cell death pathways, which create complex signalling networks that cross-guard each other in the evolutionary 'arms race' with pathogens. Finally, we describe how the resulting cell corpses - apoptotic bodies, pore-induced intracellular traps (PITs) and neutrophil extracellular traps (NETs) - promote the clearance of infection.