Identifying genes required by pathogens during infection is critical for antimicrobial development. Here, we use a Monte Carlo simulation-based method to analyse high-throughput transposon sequencing data to determine the role of infection site and co-infecting microorganisms on the in vivo 'essential' genome of Staphylococcus aureus. We discovered that co-infection of murine surgical wounds with Pseudomonas aeruginosa results in conversion of ∼25% of the in vivo S. aureus mono-culture essential genes to non-essential. Furthermore, 182 S. aureus genes are uniquely essential during co-infection. These 'community dependent essential' (CoDE) genes illustrate the importance of studying pathogen gene essentiality in polymicrobial communities.