Most of us have taken antibiotics at some point. Maybe a few weeks on an acid-reducer for heartburn, or something for anxiety after a hard stretch. We tend to think of a prescription as something that ends when the box is empty.
A large study of more than 2,500 people suggests the gut remembers.
Antidepressants, beta-blockers, acid-reducers and anti-anxiety drugs can still be shaping gut bacteria years after the last dose.
That is the finding from researchers at the University of Tartu Institute of Genomics in Estonia.
Also read: Flesh-eating parasite returns to the US after 60 years
The findings come from a project that combined stool samples with national prescription records.
They were published in the journal mSystems in September 2025 and have drawn renewed coverage this month.
Nearly 90 percent of common drugs left a mark
The team looked at 186 different medications. About nine in ten were linked to some change in the mix of bacteria in the gut while people were taking them.
For roughly four in ten, the signal was still there more than a year after the drug had been stopped.
Also read: 8 early warning signs of nerve damage in your feet most people blame on aging
Five drug families stood out for their long shadow.
They were broad-spectrum antibiotics, antidepressants, and beta-blockers for blood pressure and heart conditions.
The list also included proton pump inhibitors for reflux and benzodiazepines, the family that includes anti-anxiety pills such as diazepam and alprazolam.
For antidepressants and the anxiety drugs, differences in the gut mix were still detectable in people who had stopped the medication more than three years earlier.
Also read: This diet is linked to a 61 percent lower risk of obesity
Anxiety pills rivaled strong antibiotics
The result that most surprised the researchers concerned the benzodiazepines. Their impression on the microbiome was roughly as strong as the one left by broad-spectrum antibiotics, the drugs most famous for scrambling gut bacteria.
Even within the group, pills prescribed for very similar problems were not interchangeable.
Diazepam and alprazolam, two common anxiety drugs, left different patterns behind.
"Most microbiome studies only consider current medications, but our results show that past drug use can be just as important," lead author Oliver Aasmets said in a statement from Institute of Genomics.
Also read: How eating a handful of walnuts every day may affect your brain and heart
What this may mean if you take these medications
The study did not look at whether these microbiome shifts caused any disease. The researchers are careful not to turn their findings into a warning about taking medicine.
Aasmets has stressed that people should keep taking drugs as their doctor has prescribed. What the lasting shifts mean for everyday health is still being worked out.
The practical takeaway is small but real. If something feels off in digestion or general wellbeing after a long course of one of these drugs, past prescriptions are worth mentioning at the next doctor visit.
The authors also argue that medication history should become a standard part of any microbiome test offered to a patient.
Also read: New research questions the benefits of the MIND diet
A smaller group of 328 participants gave a second stool sample about 4.4 years after the first. The medication fingerprints were still visible in that follow-up.
This article is made and published by Ida-Marie Palm Varbæk, who may have used AI in the preparation.
