Average gut transit time is about 48-72 hours, so you'd need to eat nothing but water or glucose (which is completely absorbed in the small intestine) for that length of time. Certainly avoid fibre and starch, because those aren't broken down completely (or at all) in the small intestine.
But in most healthy people gut flora is very stable, because your intestines continuously produces mucous on which the gut bacteria can feed. So there isn't any way to completely starve all gut flora. A very severe course of antibiotics would kill them though.
"Thanks to the combination of meat, calcium-rich leaf foods, and a vigorous life, the early hunter-gatherers were robust, with strong skeletons, jaws, and teeth." - Harold McGee, On Food And Cooking: The Science and Lore of the Kitchen