We show that PTPN2 loss in macrophages promotes a strong type 1 immune response, which is necessary to promote clearance of and recovery from infection with Citrobacter rodentium, a mouse pathogen that models human enteropathogenic and enterohemorrhagic E. coli infection. Here, PTPN2 is linked to infection.