Hematologic and oncologic patients with chemo- or immunotherapy-related immunosuppression are at substantial risk for bacterial infections and Pneumocystis jirovecii pneumonia (PcP). As bacterial resistances are increasing worldwide and new research reshapes our understanding of the interactions between the human host and bacterial commensals, administration of antibacterial prophylaxis has become a matter of discussion. This guideline constitutes an update of the 2013 published guideline of the Infectious Diseases Working Party (AGIHO) of the German Society for Hematology and Medical Oncology (DGHO). It gives an overview about current strategies for antibacterial prophylaxis in cancer patients while taking into account the impact of antibacterial prophylaxis on the human microbiome and resistance development. Current literature published from January 2012 to August 2020 was searched and evidence-based recommendations were developed by an expert panel. All recommendations were discussed and approved in a consensus conference of the AGIHO prior to publication. As a result, we present a comprehensive update and extension of our guideline for antibacterial and PcP prophylaxis in cancer patients.