Surrounded by the foundation and parts of the infrastructure of a home, problems with a basement are often symptoms of larger problems with the house. An infiltration of the basement by insects such as flies often indicates a breach somewhere between the foundation and topsoil where flies find food. These flies will infiltrate a basement through several possible entries and for several reasons.
One possible reason for dead flies in a basement is the presence of a larger carcass. Flies such as blowflies, bluebottles and green bottles will search out dead and decaying animals for food and for breeding purposes. If something crawled into the basement and died, it may have inadvertently created a nursery for a fly population. Although these flies rarely bite, they carry particles of decaying matter and often fecal matter on their bodies and can become a health risk. Inspect the basement for dead animals, especially between pipes and behind any drywall.
Although flies can find their way into a basement through cracks in the foundation or through doors and windows, they are often carried into the basement by the homeowner who keeps house trash in the basement prior to collection. Especially with trash that was previously outdoors, gnats and other small flies find their way into trash bags and lay eggs near rotting meat and old food. The larvae hatch in a few days and begin to eat the decaying matter in the trash bag until they reach maturity. This problem is solved by storing trash outside or sealing it in trash containers with a sealed top.
Common flies such as the housefly lay eggs in manure, laying up to 1,000 eggs over the course of 20 days. If house flies are infesting your basement and no dead carcass can be found, flies may not be your only infestation. Search for animal droppings, such as those of rats and mice. These droppings are just as fertile ground for houseflies as horse and human droppings.
Stagnant pools of water, such as a sump in a basement, are also areas of breeding for flies. Sump pits that are not frequently flushed can accumulate deposits of moist organic matter that can serve as nurseries for houseflies and other species of gnats and flies. Sump pits are kept fly free by flushing, pumping and cleaning out deposits regularly.