The best way to prevent cluster fly infestations of buildings is to seal potential entry points to the warm, sheltered places they prefer. Homeowners should use silicone or silicone-latex caulking to seal cracks around windows, doors, chimneys and siding and should replace or repair damaged screens on windows and doors. External applications of insecticides around possible entry areas can also help but are best left to professional pest-control services.
Cluster flies originated in Europe and were probably brought to North America in ship ballast. Unlike other species of pest flies, they do not feed on rotting material or blood, so removing garbage and carrion is not helpful in controlling them. They lay their eggs in the soil, where their larvae live on earthworms. The adults do not transmit any human diseases or damage housing materials and are nuisances mostly because of their numbers as they gather at windows on warm winter days and because their excrement can leave stains on walls and windows.
Penn State University's College of Agricultural Sciences recommends against use of insecticides once the flies have gained access to attics or wall voids. While insecticidal dust treatments kills the flies, the dead flies may attract carpet beetles, which may eat woolens and stored dry goods as well as the fly carcasses. Professional extermination services are usually the best way of getting rid of an established infestation.