Scientists found that nearly half of medications included in their study had long-term effects on the gut microbiome.
Taking antibiotics can often lead to a collection of side effects: constipation, diarrhea, and bloating, for example. This happens because antibiotics are meant to target infection-causing bacteria, and as collateral damage they kill off other bacteria in the gut as well. However, increasingly, researchers are finding that non-antibiotic drugs affect the gut microbiome too.1,2
A recent study found that past medication usage—even those used years prior—may have a lasting effect on the gut microbiome.3 This was true for antibiotics as well as for many non-antibiotic drugs including antidepressants, proton pump inhibitors, and beta-blockers. The new findings, published in mSystems, mean that researchers studying the link between diseases and the microbiome should take into account past drug usage.
Oliver Aasmets uses computational biology approaches to study the gut microbiome.
Karl Erik Piirimees
The study used data from the Estonian microbiome cohort, which includes 2,509 individuals who provided stool samples, in conjunction with national electronic health records that document participants’ disease states and medication use.4 Oliver Aasmets, a computational biologist at University of Tartu and coauthor of the new paper, said that this type of study hasn’t been done in the past because “datasets usually don’t have this data for long-term drug usage.” Because the Estonian electronic health records contain years of medication usage data dating back to 2004, the researchers could tease apart the links between the gut microbiome and current medication use, past medication use, and past long-term medication use.
Out of the 186 drugs assessed in the study, Aasmets and his team found that 90 percent of the drugs taken at time of microbiome sampling were associated with the microbiome composition. Of these drugs, the researchers next looked to see whether past usage had a similar trend. For this, the researchers compared the microbiomes of participants who had never taken a specific medication to those that took the medication at least one year before providing the stool sample. The researchers found that 42 percent of these drugs were still associated with changes in the microbiome even when they were taken over one year before. These drugs included benzodiazepine derivatives, biguanides, proton pump inhibitors, and antidepressants. In cases like benzodiazepines and antidepressants, the researchers observed a change in the microbiome even if a person last used the drug over three years prior.
While many people take these types of medications long term, some people take them for shorter timeframes, giving Aasmets and his colleagues a chance to see whether there was a cumulative effect from past drug usage. To do this, they compared participants who had taken the drug for longer durations to those who had taken the same drug for less time. For drugs such as benzodiazepines, antidepressants, and protein pump inhibitors, the researchers found that repeated long-term use was linked to a larger effect on the microbiome.

The researchers used the Estonian Microbiome cohort to study four types of effects that drugs can have on the microbiome.
Aasmets et al. 2025. CC-BY 4.0
The researchers verified their findings using a subcohort of 328 participants who provided an additional stool sample after a median of about four years. With the two microbiome samples, the researchers could see how starting new drugs or stopping a medication affected the microbiome. Aasmets said that although the data from this subcohort helped the team validate the result from the large cohort, it didn’t necessarily prove a causal link between drug use and microbiome changes; however, he thinks that causality is highly likely. Furthermore, they noticed that when participants discontinued a drug, the immediate effects, which were more dramatic than the long-term effects, on the microbiome reversed.
Because many research studies look for connections between the microbiome and a specific disease, Aasmets pointed out that what appear to be disease-specific effects on the microbiome could actually be “hidden drug effects” that researchers couldn’t investigate without studies like this one. Riadh Hammami, a gut microbiome researcher at University of Ottawa who was not involved in the study, said that the work was “excellent” in highlighting medication as a confounding factor. He added that this “is a critical point that we need to leverage” as many studies in the past—such as those looking at the association between the gut microbiome and depression—don’t take into account medication as a confounding factor.
These findings could have real-world implications for people taking medications as well. “We also saw that for some drugs that actually are prescribed for the same condition, the effect on microbiome might be actually rather different,” said Aasmets, who suggested it could be worth taking the different effects on the microbiome into consideration to minimize the amount of collateral damage. “This is something that we should study in general as a field.”
Long-term effects on the microbiome may seem alarming, but stopping necessary medications can be even more harmful. Aasmets said, “People definitely should keep taking drugs as their doctor has prescribed.”