Often mistaken for fruit flies, drain flies are small flying pests which breed quickly and live off decaying organic material and stagnant water, hence their preference for drains. They grow to no more than 1/5 of an inch and have dark, furry wings. Drain flies lay up to 200 eggs at a time, which hatch within two days and live for up to 15 days before emerging as adults. Although they are not harmful, it is wise to take care of a drain fly infestation as soon as possible to prevent further breeding.
Identify the source of the infestation. Drain flies are terrible at flying, so you probably don't need to look very far to find the offending drain. Attach a piece of tape to the nearest drain, sticky side down, and wait 24 hours. If you see flies on the tape, you've found the source.
Clean the drain in question with a pipe brush first, and then use a plumbing snake. Get rid of all possible organic material that the flies may use for food. If you haven't cleaned your drain in a while, this may be pretty gross, so wear rubber gloves and don't breathe in too deeply.
Use a drain cleaner to clean out any remaining gunk or film that drain flies may breed in. Any drain cleaner you can find at your grocery or hardware store will work. Ask The Exterminator also recommends spraying the area with insecticide meant to kill flies. Bleach will not do the trick as it only kills bacteria, not insects.
Run water down the drain to flush any remaining organic material as well as the chemicals from the cleaner and insecticide down the drain.
Use a plunger to be sure all decaying organic material has been removed from the drain. Plunge for several minutes to be sure the drain is clear.
Pour boiling water down the drain to wash down anything the plunger may have loosened.
Clean all your drains once a month and run your kitchen garbage disposal daily to prevent drain fly infestations.