Background and AimHealthcare‐associated infections (HAIs) after pancreaticoduodenectomy (PD) are one of the common postoperative complications. This study aims to investigate the epidemiology of postoperative HAIs in patients with open pancreaticoduodenectomy (OPD) and robotic pancreaticoduodenectomy (RPD).MethodsThis retrospective cohort study described the trend of HAIs in patients undergoing PD from January 2013 to December 2022 at a tertiary hospital. Patients were divided into OPD and RPD, and the HAIs and outcomes were compared.ResultsAmong 2632 patients who underwent PD, 230 (8.7%, 95% confidence interval [CI] 7.7–9.9%) were diagnosed with HAIs, with a decreasing trend from 2013 to 2022 (P < 0.001 for trend). The incidence of postoperative HAIs was significantly higher in patients with OPD than RPD (9.6% vs 5.8%; P = 0.003). The incidence of HAIs for patients with OPD showed a decreasing trend (P = 0.001 for trend), and the trend for RPD was not significant (P = 0.554 for trend). Logistic regression showed that RPD was significantly associated with postoperative HAIs after adjusting for covariates (adjusted odds ratio = 0.654; 95% CI 0.443–0.965; P = 0.032), especially in the subgroup of patients without preoperative biliary drainage (adjusted odds ratio = 0.486; 95% CI 0.292–0.809; P = 0.006). Regarding clinical outcomes, RPD has a shorter length of stay and a more expensive charge than OPD (all P < 0.05).ConclusionPostoperative HAIs in patients with PD showed a decreasing trend in recent years, especially in OPD. RPD was significantly associated with reduced postoperative HAIs and length of stay, although the charge is more expensive. Attention should be paid to postoperative HAIs in OPD, and it is imperative to continue reducing the costs of RPD.