Your gut microbiome, which is home to trillions of microbes, plays a key role in everything from digestion to mood. When it’s out of balance, with too many “bad” bacteria, it can fuel inflammation and even contribute to chronic diseases.

Some habits support a healthy gut, like eating plenty of fermented foods—but certain medications can tip the scales in the wrong direction. Here are four common drugs experts say could disrupt your microbiome.

1. Antibiotics

Antibiotics are perhaps the most well-known medications for causing gut troubles. 

Broad-spectrum macrolide antibiotics, like azithromycin (Z-pack) and erythromycin, work by stopping bacteria from growing and, at higher doses, can also kill bacteria—both good and bad. Paradoxically, a 2022 research review suggests that antibiotics can sometimes create conditions that allow harmful bacteria, such as Clostridium difficile (C. diff), to thrive.

Antibiotics can also stimulate gut motility on their own, contributing to unwanted gastrointestinal effects, said James Cox, MD, a board-certified gastroenterologist and assistant professor at Texas Christian University.

Because of these potential effects, when prescribing antibiotics, physicians may recommend consuming foods like yogurt or kefir, which contain probiotics (live cultures) that can help replenish the microbiome with beneficial bacteria.

The good news is that the impact of occasional antibiotic treatment on the microbiome is usually short-lived. “Usually the symptoms of a short-term course [of antibiotics] are only during the taking of the medication,” Cox told Health. “It would be rare, but not impossible, to develop a long-term condition after a short change in the microbiome.”

2. Proton Pump Inhibitors

Another potential gut disrupter? Proton pump inhibitors (PPIs) like Prevacid, Prilosec, and Nexium, which treat gastroesophageal reflux disease and stomach ulcers by suppressing stomach acid. 

But stomach acid plays an important role in gut health: it aids digestion and acts as a barrier against harmful bacteria we might ingest, preventing them from reaching the gut and potentially disturbing the microbiome. 

“Oftentimes, PPIs are overused because they’re very easily accessible,” said Jasmohan Bajaj, MD, a professor of medicine in the gastroenterology, hepatology, and nutrition division at Virginia Commonwealth University. “That could have an impact on your gut microbiome and could be associated with future problems with infections.”

“Talk to your practitioner to see if you still need that PPI,” he suggested.

3. Selective Serotonin Reuptake Inhibitors

Selective serotonin reuptake inhibitors (SSRIs) are often prescribed to treat depression, anxiety, and other mental-health conditions. They work by increasing the activity of serotonin, a “feel-good” neurotransmitter. But most serotonin is actually produced in the gut, not the brain, so SSRIs can potentially alter the gut microbiome. They may also have an antimicrobial effect.

However, just how these medications change the microbiome isn’t fully understood—and it’s possible that the effects may even be positive. “Whether we’re changing the brain-gut axis or whether it’s a change in our mood or affect, we’re just not sure,” Cox said.

4. Digoxin

Digoxin, a medication used to treat congestive heart failure, may also affect the gut microbiome.

Some research—mostly on mice—suggests that digoxin introduces antimicrobial proteins into the gut, potentially wiping out microbes responsible for alerting the immune system to invading pathogens. This could make the body more susceptible to persistent infections.

Research on digoxin’s effects in humans is limited, however. “It may be that digoxin, which is made from plant material, is food for the microbiome,” Cox said. “Whether or not it’s the good or the bad bacteria that are eating this, we don’t know.”

How to Protect the Gut Microbiome

Everyone’s microbiome is as unique as a fingerprint and changes regularly, so any medication has the potential to affect it, Bajaj said. That makes it difficult to predict whether an alternative drug would impact the gut more, less, or not at all. Often, the only sign of a change is new GI effects.

To help protect your microbiome, take antibiotics only when necessary, consult your physician about ongoing medications, and consider updated lab work to see if you still need previously prescribed drugs, Bajaj said. When starting a new medication, avoid making major dietary changes at the same time to minimize additional impacts on your gut.

When it comes to your diet, prioritize soluble fiber, which acts as fuel for beneficial gut bacteria. Good sources include apples, bananas, beans, oats, and avocados. Fermented foods like plain yogurt, kefir, and sauerkraut provide probiotics that deliver more healthy bacteria to the gut. 

Finally, cut back on alcohol, which can have negative effects. “Alcohol can directly influence the gut barrier and microbiome,” Bajaj said.