Your Gut Remembers Every Prescription, Not Just the Antibiotics

Most of us assume that when a medication leaves our system, the story ends. You finish the course of antibiotics, the drug clears, and the body returns to baseline. A study published in September 2025 in the journal mSystems suggests that assumption is wrong, and that the gut microbiome keeps a record of what you have taken for years after the last pill.

What makes this study different from most microbiome research is the quality of its records. Working with the Estonian Microbiome Cohort, 2,509 adults aged 23-89 who provided stool samples, they linked those samples to the Estonian national electronic health record system. That link matters enormously. Instead of asking people to remember what medications they took over the past five years, a method that reliably produces incomplete and flattering answers, the researchers could see every prescription that was actually filled, when it was filled, and how many times. Then they sequenced the participants’ gut bacteria using shotgun metagenomics, which reads the genetic material of the entire microbial community rather than a single marker gene.

The Scale of the Exposure

The first thing the data reveal is how medicated the ordinary population is. Among these participants, 433 distinct prescription drugs were in active use at the time of stool collection. Over the five years leading up to that moment, 507 distinct drugs had been used. About a third of the cohort (857 people, 34.2%) were taking no prescription drug at all when sampled. Everyone else was taking an average of about three.

The most commonly used drug classes at sampling were beta-blocking agents (9.3% of the cohort), proton pump inhibitors (8.4%), and benzodiazepine derivatives (7.1%). None of these are exotic. They are the everyday furniture of modern medicine, and between them they cover blood pressure, reflux, and anxiety or sleep.

Nearly Every Drug Left a Signature

Of 186 medications the team could analyze with adequate numbers, 167 (89.8%) were associated with the gut microbiome in some measurable way, whether in overall diversity, in the community’s compositional structure, or in the abundance of at least one bacterial species.

Antibiotics were not the only culprits. When the researchers ranked drug classes by how much microbiome variation each one explained, beta-blockers came first, macrolide antibiotics second, and biguanides (the class that includes metformin) third. Beta-blockers, macrolides, and benzodiazepines all correlated negatively with microbial richness, meaning that users simply had fewer distinct bacterial species in their gut than non-users. Diversity fell further as the number of different drugs a person was taking rose.

The researchers were careful here, and it deserves credit. All analyses were adjusted for body mass index, sex, and age, and they then ran a rigorous deconfounding procedure to test whether an underlying disease, another drug, or diet and lifestyle could better explain each drug-microbe association. Most of the associations survived that test. The drug, not the condition it treated, drove the signal.

One of the more striking findings came from a machine learning experiment. Researchers trained a model on microbiome data to recognize whether someone had used macrolide antibiotics. Accuracy was high, with an area under the curve of 0.94. They then applied that same antibiotic-detecting model to people taking non-antibiotic drugs, and it still identified biguanide users (0.71) and selective serotonin reuptake inhibitor users (0.67). A model trained on penicillin use could detect antidepressant and corticosteroid users. In other words, the fingerprint ordinary medications leave on gut bacteria overlaps substantially with the fingerprint antibiotics leave. Drugs that were never designed to kill bacteria are behaving, in the gut, somewhat like drugs that were.

The Effects Outlast the Prescription

Here the paper reaches its central question. Investigators went back and asked whether the microbiome differences persisted in people who had stopped taking the drug years earlier, comparing former users against people who had not touched that drug in five years.

They found carryover effects for 78 drugs. For macrolides, penicillin combinations, benzodiazepine derivatives, and antidepressants, the microbiome signature was still detectable when the last dose had been taken more than three years before the stool sample.

The antibiotic finding was particularly sobering. When the team plotted microbial richness against time since the last antibiotic course, the richness of antibiotic users never climbed back to the level seen in people who had never taken them, regardless of how long ago the treatment ended or how much had been taken. The data showed no clear point of full recovery.

The effects also proved additive. To test that, they compared statistical models of increasing complexity: one accounting only for whether someone was taking a drug now, one adding whether they had taken it in the past five years, and one adding how many prescriptions they had filled. For most drugs, knowing about past use improved the model. For beta-blockers, benzodiazepine derivatives, and glucocorticoids, knowing the quantity of past use improved it further. More exposure meant more change.

Then comes the number that reframes the whole field. When the team calculated how much of the total variation in gut microbiome composition each factor explained, past drug use accounted for 0.74% while current drug use accounted for 0.47%. Your prescription history matters more to your current microbiome than your current prescriptions do. In their overall ranking of contributing factors, past drug use ranked above diseases, body measurements, and current medication, trailing only stool characteristics and diet.

A Second Look, Years Later

Cross-sectional findings always invite the question of whether the arrow points the other way. Perhaps people with certain gut bacteria are simply more likely to end up on certain drugs.

The researchers addressed this with a subgroup of 328 participants who gave a second stool sample after a median of 4.4 years. They identified people who were drug-naive at the first sample and who started a medication in between, then watched what happened to their bacteria. For penicillins, macrolides, proton pump inhibitors, benzodiazepine derivatives, and glucocorticoids, starting the drug was followed by microbiome changes matching the ones seen in the cross-sectional analysis. They also examined people who stopped medications, and those individuals showed shifts in the opposite direction.

That pattern, changes appearing when a drug is started and reversing when it is stopped, is the strongest evidence available short of a randomized trial that the drug is doing the changing.

Where This Leaves Us

I want to be careful about what this study does and does not show, because the popular coverage has run ahead of the data.

It does not show that these medications harm you. It shows that they alter the composition of the gut bacterial community and that the alteration persists. Whether a given shift is good, bad, or neutral for health is a separate question this paper does not answer. Related work from the same group in mice found that repeated antibiotic exposure disrupted the gut’s protective mucus layer and increased abdominal fat, but that is a mouse study and a different question.

The study has real limits, which the authors state plainly. It covers only prescription medications, so over-the-counter drugs remain unexamined. The study assumes participants swallowed a filled prescription. Its cohort skews female and, like most volunteer biobanks, probably healthier than the general population. Bacterial abundance is measured in relative, not absolute, terms.

A fascinating detail also has practical implications. Drugs within the same class did not behave the same way. Metoprolol showed a far broader microbiome effect than nebivolol, though both are beta-blockers. Alprazolam had a broader effect than diazepam. Omeprazole differed from pantoprazole and esomeprazole, and for omeprazole some effects appeared only at higher doses. As the authors suggest, reasonably, if two drugs treat the same condition equally well and one disturbs the microbiome less, that might eventually factor into choosing between them. We are not there yet, but the question is now on the table.

The most important practical point I can offer is this: do not stop a prescribed medication because of this study. A beta-blocker preventing a cardiac event, a glucocorticoid controlling an inflammatory disease, an antibiotic treating a real infection. These are doing work that matters, and the microbiome consequence is a cost worth paying when the drug is genuinely needed. The finding argues not for abandoning medications, but for taking seriously the ones that are not needed. A periodic review of everything on your list, asking each item whether it still earns its place, has always been good medicine. This study adds one more reason.

For those of us who work with the microbiome as part of assessing metabolic and immune health, there is a further lesson. If you order microbiome testing and interpret the result without knowing what the patient took three years ago, you may be reading a pharmacy record and mistaking it for biology. Long-term drug effects can confound apparent associations between disease and the microbiome, the authors show, which means some of what the field has attributed to illness may in fact belong to treatment.

There is something humbling in all of this. Our gut community is not a passive backdrop. That community carries a memory of what we have put into our bodies, and the memory runs longer than anyone expected. Intervening in a living system rarely leaves that system exactly as it was found, and stewardship of the body is a long game rather than a series of isolated transactions.

Reference: Aasmets O, Taba N, Krigul KL, Andreson R, Estonian Biobank Research Team, Org E. A hidden confounder for microbiome studies: medications used years before sample collection. mSystems. 2025;10(10):e00541-25.