House flies breed in decaying organic matter such as garbage, compost, and animal waste, then travel freely between those sources and food preparation surfaces indoors. Because they regurgitate and defecate wherever they land, they can transfer bacteria to countertops and food far more readily than their small size suggests.
Population booms usually trace back to a nearby breeding source such as an overflowing bin, pet waste, or a rotting food source. Removing that source, keeping bins sealed, and installing door and window screens are the most effective ways to keep numbers down between treatments.

