As with all pest issues, flying insects should be properly identified prior to attempting to gain control. Different flying insects typically prefer different breeding habitats and feed on different sources of food. Most filth flies, for example, prefer rotting plants or meats as foods or breeding sites.
Proper food storage is key, especially for stored product pests (SPP). Any open food items should be stored in sealed containers.
Overall, good sanitation is crucial to gaining and maintaining control of flying insects. Make sure that any trash containers are properly located and sealed shut with tight-fitting lids and are sound, with no entry/exit points for flies. Trash containers also should be located as far as possible from entry doors or windows. Maintain drains by regularly cleaning them, to ensure organic materials can’t build up within.
One last point is to ensure entry doors are maintained to exclude flies; they should properly shut and have intact seals.