Poor sanitation is the main cause of house fly infestations. Organic matter, including garbage, pet food and animal feces, attracts flies because it provides food and breeding grounds.
To control house fly populations, identify and remove materials on which the flies can feed and lay their eggs. Keep household trash in sealed plastic bags or sealed containers, cover composted materials with at least 6 inches of soil, and keep pets' food bowls and litter trays clean. Clean food spills and dishes immediately, and do not leave food standing out. Repair leaks and drips to eliminate moist areas. Pest control products kill adult house flies, but infestations reoccur if there is a failure to remove and destroy eggs, larvae and breeding areas.