House flies, transmitters of serious diseases, feed on and breed in food, garbage, and animal droppings. Discourage their presence by properly storing food, by maintaining a clean kitchen, and by bagging and sealing garbage. Keep your yard free of animal droppings and refuse. Hose down garbage cans, dry them in the sun, and secure their lids.
Make sure that all door and window screens are in good condition and fit tightly. Flypaper may catch the odd fly that enters despite your precautions. A craftily wielded flyswatter makes a trusty dispatcher.
Pot houseplants with sterilized soil to prevent the fungus gnat, which resembles a small fly, from breeding. Spray diehard flies with pyrethrins.