Drain flies, also known as moth flies and sewer gnats, are commonly found living in kitchen and bathroom drains. In addition to being unsightly, drain flies can put you at risk for developing bronchial asthma from breathing in dead drain flies. Fortunately drain flies -- not to be confused with fruit flies -- can be removed using products found around the house and at most hardware stores.
Unclog the drain. Drain flies lay eggs in the drain (think of the clumps of hair and food in your drain as nests). You can use a plumbing snake, available at most hardware stores, to remove these clumps.
Pour a drain cleaner down the drain once you have removed the clumps. A drain cleaner such as Drano or Cobra will remove the organic debris that is stuck in the drains further than the plumbing snake will reach.
Run water down the drain for a couple minutes and then use a plunger (like you would use for your toilet) to plunge the drain. This may sound like overkill, but all stages of fruit fly infestation depend on organic debris to complete the cycle and thus you must remove every little piece of debris you can.
Clean your house thoroughly. Drain flies are not restricted to drains. If piles of food or standing water are left around the house, these flies will take up residence there.