Ways to get rid of drain flies include eliminating their breeding grounds by cleaning drains indoors or repairing sewer leaks outdoors. Eliminating or treating areas where water tends to pool from rain or air conditioner drain lines also helps to control their populations.
To prevent drain files from reproducing in drains, it is necessary to remove the rotting organic matter that clings to the walls of the pipes. A drain-cleaning brush fits through the drain to scrub the pipes. Once the pipes are clean, pouring a pot of boiling water down the drain washes away the material the brush loosens. For home occupants who prefer to avoid manual cleaning, there are commercial drain cleaning products that break down the film so that it is easy to wash down the drain.
Repairing sewer leaks is a messy job that most homeowners prefer to leave to the professionals. However, as long as sewage is seeping to the top of the ground, the flies continue using it as a reproduction ground. For low-lying areas that tend to collect water and encourage algae growth, the best solution is filling the area with additional soil. Insecticides are also useful in providing temporary relief from drain flies.