Flies can carry bacteria and viruses that cause conditions such as diarrhea and food poisoning. House flies pick up disease agents while feeding on materials like feces and then deposit them onto human food after contact with or feeding on human food.
The best way to deal with house flies is to use a combination of exclusion and sanitation practices. While humans commonly find adult flies to be the most bothersome life stage, the larval stage is the best target for management efforts. Elimination of larval habitat is the preferred method of pest fly suppression. Female flies deposit eggs in moist organic material, and flies can develop from egg to adult in as little as 7 days. Remove garbage weekly to reduce the attractiveness of the area to adult flies and limit their breeding sites.
For control of a few adult flies, the time-tested fly swatter is most appropriate, although swatters and “bug zappers” should not be used near food preparation as splattering insect parts may contaminate food. Keep flies out of the house by using screens and sealing cracks around windows and doors.
Read more detailed information about some of the common pest flies in California and their management in UC IPM's recently revised Pest Note: Flies by Dr. Alec Gerry of UC Riverside's Department of Entomology.