Flies, Arrgh! Q for entomologists and all-around bug enthusiasts

My Google-fu is weak. I cannot find an answer for this!

I woke up Friday morning to a bit of a fly problem. In my misguided frugality, I waited longer than I should have to take the trash out because it wasn’t full. Flies ensued.

So, they were new flies, “hatched” or whatever they do overnight. (the thought of the maggots for several days hanging out in the trash can just really squicks me out)

Anyway, took out the trash Friday morning, moved all fruit and produce into the fridge, and figured I would have a lot of fly chasing to do once I got home, as I needed to get to work. The cats seemed to be enjoying themselves, anyway.

So I got home about 12 hours later and all the flies were dead. I searched around for carcasses and found about 15. Now, I know the cats didn’t get them all - I’m sure they ate ones they might have got hold of. But what the heck killed them all so fast? The only factor I can think of besides removing all the food, is that I do have some diatomaceous earth spread around the baseboards in the bedroom and kitchen. It’s not a place I would think each of those flies would have landed - and they have to land/walk in it for it to work, plus I didn’t think it worked that fast.

I wondered if the removal of all food and that they didn’t eat after they “hatched” was really what did it. If not, I’ve got something around here that’s really marketable but I don’t know what it is!