Adult fruit flies lay about 500 eggs near fermenting organic material, such as a rotting garbage, rotting potato or overripe banana. The eggs hatch into larvae in 24 to 30 hours and feed on the organic material. Larvae transform into pupae and then emerge as adult fruit flies, who mate within two days. Fruit flies typically take one to two weeks to complete their life cycle, depending on the temperature. Because fruit flies reproduce so quickly, locating the source of an infestation is important.
A fruit fly infestation may be caused by overripe or rotting produce, such as onions, bananas, apples or potatoes. Fruit flies are also attracted to soda, cider and fruit juices, empty drink cans or bottles that contain residue, baked goods that contain yeast, food residue in empty containers, garbage or dirty dishcloths. Fruit flies sometimes breed in garbage disposals, clogged or filmy drains, dirty water and dirty mops. Fruit flies may also breed in an outside garden and move inside.
If you can identify the source of the fruit flies, such as a rotting tomato, discarding the source may eliminate an infestation. If you aren't sure where fruit flies are breeding, clean the area and discard any suspect produce. Tape plastic film over drains and check them after a day; if you see fruit flies, they are breeding in that drain. Eliminate fruit flies in a drain by scrubbing it with a stiff brush or slowly pouring boiling water down the sides of the drain. Trap adult flies by pouring a few ounces of cider vinegar into a jar and covering the jar with a paper funnel rolled from notebook paper.
Prevent fruit fly infestations by discarding, eating or refrigerating ripe fruit. Keep your kitchen, pantry and refrigerator clean to ensure that produce items are not forgotten or misplaced. Clean up spills and sweep and mop regularly. Rinse containers before placing them in a recycling bin, and empty the recycling bin and trash frequently. Make sure doors and windows have screens. If you can fruits and vegetables or make beer, cider or wine, make sure containers are completely sealed.