The human microbiota greatly affects physiology and disease; however, the contribution of bacteria to the response to chemotherapeutic drugs remains poorly understood. Caenorhabditis elegans and its bacterial diet provide a powerful system to study host-bacteria interactions. Here, we use this system to study how bacteria affect the C. elegans response to chemotherapeutics. We find that different bacterial species can increase the response to one drug yet decrease the effect of another. We perform genetic screens in two bacterial species using three chemotherapeutic drugs: 5-fluorouracil (5-FU), 5-fluoro-2'-deoxyuridine (FUDR), and camptothecin (CPT). We find numerous bacterial nucleotide metabolism genes that affect drug efficacy in C. elegans. Surprisingly, we find that 5-FU and FUDR act through bacterial ribonucleotide metabolism to elicit their cytotoxic effects in C. elegans rather than by thymineless death or DNA damage. Our study provides a blueprint for characterizing the role of bacteria in the host response to chemotherapeutics.