Different bacteria thrive on different nutrients, so changing your nutrient intake will affect their populations. I wouldn't expect a week of fast food to be significant compared to going on a ketogenic diet (starving all carbohydrate eating bacteria). Also, intake of new bacteria affects them, as it changes the competitive landscape.
Taking antibiotics massively reduces the quantity of gut bacteria. It often radically changes the balance as their numbers recover, resulting in a proportional increase in resistant strains.
Wonder what is the impact for those who just take Soylent for their meals. Does the lack of variety of nutrients kill of some bacteria in the gut and are they worse off for it?
I'm not sure it's correct to say Soylent constitutes a lack of variety of nutrients. Soylent and similar products contain a balance of macronutrients (carbohydrate, lipids, amino acids), vitamins and minerals.
Eating a ketogenic (almost no carbs) or fruitarian (almost entirely carbs) diet, is much more likely to create an imbalance in types of gut flora.
Taking antibiotics massively reduces the quantity of gut bacteria. It often radically changes the balance as their numbers recover, resulting in a proportional increase in resistant strains.