Your antidepressants and antibiotics may be reshaping your gut for years
A large Estonian cohort study found that dozens of common medications, not just antibiotics, leave a lasting mark on gut bacteria detectable years after someone stops taking them.
If you have ever wondered why your gut still feels off years after finishing a course of antibiotics, or well into a course of antidepressants, a new study offers evidence that it is not just in your head. Researchers who linked a large Estonian health biobank to years of pharmacy records found that dozens of common medications, not only antibiotics, leave a signature in gut bacteria that persists long after the prescription runs out. For anyone puzzling over an unusual gut microbiome test result or a digestive issue that will not resolve, medication history from years back may matter as much as this week's diet.
Key takeaways
- Researchers linked electronic health records to gut microbiome data from 2,509 Estonian adults and found 167 of 186 medications tested were associated with changes in gut bacteria.
- Nearly half of those drugs, including antidepressants, benzodiazepines, proton pump inhibitors (PPIs), beta-blockers and antibiotics, showed effects still detectable three or more years after someone stopped taking them.
- A follow-up sample from 328 of the same people, taken years later, showed matching shifts around the time people started or stopped a drug, which points toward the medications actually causing the change rather than just tracking alongside it.
- The findings are observational and do not prove these gut changes cause disease, but they suggest medication history belongs in any serious reading of a microbiome test.
Antidepressants and antibiotics leave gut bacteria altered for years
A person's medication history from years in the past shows up in their gut microbiome (the community of trillions of bacteria living in the digestive tract), not just the drugs they are taking right now. Researchers led by scientists at the University of Tartu in Estonia, publishing in the American Society for Microbiology journal mSystems, screened 186 medications against stool bacteria data and found 167 (89.8%) were linked to some measurable shift in the microbiome, whether in the diversity of bacterial species present or the abundance of specific species. Of those, 78 medications showed a carryover effect: an association that was still detectable years after someone had stopped taking the drug, even after the researchers statistically accounted for the person's current medications, age, weight and underlying health conditions.
Antidepressants, sedatives and reflux drugs rival antibiotics' effects
Antibiotics are the medication most people associate with gut damage, but this study's most surprising finding involves everyday, non-antibiotic drugs. Benzodiazepines (a class of anti-anxiety and sedative drugs including alprazolam, brand name Xanax, and diazepam, brand name Valium) had a broader effect on overall gut bacteria composition than several classes of antibiotics, and their carryover effects lasted for years, comparable to broad-spectrum antibiotics like macrolides and penicillins. Antidepressants, PPIs (proton pump inhibitors, the acid-reducing drugs used for reflux and heartburn, such as omeprazole), beta-blockers (blood pressure medications), and biguanides (the diabetes drug class that includes metformin) all showed similar lasting associations. PPI use in particular was tied to a higher abundance of two bacterial species that normally live in the mouth, Streptococcus parasanguinis and Veillonella parvula, turning up in the gut, a pattern also reported in other PPI-microbiome research and one that has been linked to gut inflammation in people with inflammatory bowel disease (IBD). The researchers also noticed that alprazolam had a broader microbiome impact than diazepam, even though both are benzodiazepines prescribed for similar reasons, hinting that the specific drug chosen, not just the drug class, may matter.
A 2,509-person Estonian biobank made the carryover effect visible
Proving that old prescriptions still show up in gut bacteria years later required something most microbiome studies do not have: a decade of verified pharmacy records to match against stool samples. The Estonian Microbiome Cohort provided stool, blood and buccal swab samples from 2,509 adults aged 23 to 89 (mean age about 50), which the researchers cross-referenced against the Estonian Health Insurance Fund and two major hospitals' electronic health records covering five years of confirmed prescription purchases, rather than relying on people's memory of what they took, which tends to undercount medication use. A subset of 328 participants provided a second stool sample after a median follow-up of 4.4 years, letting the team compare each person's own gut bacteria before and after they started or stopped a given drug. Because the same directional changes showed up in this before-and-after comparison as in the larger cross-sectional analysis, the researchers argue the pattern is more likely to reflect a real, causal effect of the drugs rather than people who take certain medications simply having different gut bacteria to begin with. This mirrors other recent work showing that even a single course of antibiotics can reshape the gut microbiome for years.
What this means if you have taken these medications
If a gut microbiome test comes back looking unusual, or a digestive symptom will not resolve, this study is a reason to think about medication history from years back, not only this week's diet or a current prescription. The researchers found that antibiotic users' bacterial diversity did not fully catch up to that of non-users even years after their last course, regardless of how much antibiotic they had been prescribed in that stretch. That is worth mentioning to a doctor or dietitian working through unexplained gut symptoms: a benzodiazepine taken three years ago, a course of antidepressants, or a long run of an acid reducer could still be part of the picture. None of this is a reason to stop a prescribed medication, and the study does not identify a specific supplement, diet or probiotic that reverses these changes, because it was not designed to test one.
Why this is not proof of harm yet
The study is observational, which means it can show that medication history and gut bacteria are linked without proving that the resulting bacterial changes cause any particular disease or symptom. The researchers relied only on prescription purchases logged in Estonia's health system, so over-the-counter drug use was not captured, and they assumed that a filled prescription meant the medication was actually taken. The cohort also skews toward women (70.3% of participants) and toward generally healthier, health-conscious volunteers, which may not represent the wider population, especially older adults or people with heavier drug burdens in clinical settings. The analysis used relative bacterial abundance rather than absolute bacterial counts, a measurement choice that can understate or distort some real biological changes.
What researchers want to study next
The team is calling for larger, more diverse cohorts that can pin down effects at the level of individual drugs and doses rather than broad drug classes; they already found that omeprazole's effect on some gut bacteria only appeared at higher doses, suggesting dose matters and needs its own study. They also want to test whether choosing a different drug within the same class, such as diazepam over alprazolam for anxiety, could ease the microbiome impact without compromising treatment, and whether the carryover effects they measured actually translate into any physiological consequence for the people carrying them, something this study was not designed to answer.
Common questions
Does this mean antibiotics are the worst offenders? Not necessarily. Broad-spectrum antibiotics like macrolides had strong, long-lasting effects, but so did benzodiazepines, and in some comparisons benzodiazepines affected a broader range of gut bacteria than several antibiotic classes did.
Should I stop taking my medication because of this study? No. The study did not test whether these bacterial changes cause any disease or symptom, and stopping a prescribed medication should always be discussed with a doctor first.
How long do these effects really last? For several drug classes, including antidepressants, benzodiazepines and certain antibiotics, the researchers could still detect an association three or more years after the last recorded use, and antibiotic users' diversity deficits persisted throughout the study's observation window.
Evidence Rating
EMERGING — 90/100
Caveats
- Observational study; cannot fully establish causation despite the before/after subcohort design
- Only captures prescription drug purchases logged in the Estonian health system, not over-the-counter medication use
- Assumes a filled prescription was actually taken by the patient
- Cohort skews female (70.3%) and toward generally healthier volunteer biobank participants, limiting generalizability
- Used relative rather than absolute bacterial abundance measurements
Large observational cohort (n=2,509, validation subcohort n=328) linking Estonian electronic health records to shotgun metagenomics gut microbiome data, published in mSystems (ASM). Strong sample size and a rare before/after validation subcohort strengthen the case for a real carryover effect of both antibiotics and non-antibiotic medications, but the design remains observational/correlational and does not establish disease-level consequences.
References
- Oliver Aasmets, Nele Taba, Kertu Liis Krigul, et al. (2025). A hidden confounder for microbiome studies: medications used years before sample collection. mSystems. https://doi.org/10.1128/msystems.00541-25
- Xian Zhang, Qing Li, Siyuan Xia, et al. (2024). Proton Pump Inhibitors and Oral–Gut Microbiota: From Mechanism to Clinical Significance. Biomedicines. https://doi.org/10.3390/biomedicines12102271
- A Single Course of Antibiotics May Reshape the Gut Microbiome for Years (Scientific American). Scientific American. https://www.scientificamerican.com/article/a-single-course-of-antibiotics-may-reshape-the-gut-microbiome-for-years/