How to Get Rid of Fruit Flies in the House

Fruit flies in the family Drosophilidae, most commonly Drosophila melanogaster, are small vinegar flies that breed in fermenting organic matter and can complete a full life cycle from egg to adult in as little as eight to ten days at room temperature. This rapid generation time means that a population can expand from a few adults to hundreds within two to three weeks if the breeding source is not identified and removed. Trapping adult flies without eliminating the breeding substrate has no lasting effect; the adult population is replaced continuously as new adults emerge. Effective control requires locating every breeding site, removing it, and preventing new organic matter from accumulating in the same conditions.

Where Fruit Flies Breed

The breeding site is always a moist organic material in a warm, sheltered location. Overripe or damaged fruit left on the counter is the most visible source, but fruit flies breed in a wide range of locations that homeowners often overlook. A forgotten potato or onion at the back of a cupboard, a recycling bin with residue in empty bottles and cans, the drain biofilm in kitchen and bathroom sinks, the drip tray under the refrigerator, the spill residue under appliances, and the moist potting soil of overwatered houseplants are all common breeding sites.

Drain biofilm is a particularly persistent breeding source because it is difficult to fully remove and regenerates if cleaning is not repeated. Fruit flies lay eggs in the gelatinous film that accumulates in sink and floor drains from grease, food particles, and soap residue. Adults emerging from drains appear directly at the sink regardless of whether any fruit or produce is present in the kitchen, which is a useful diagnostic clue.

Locating the Breeding Source

Identifying the breeding source is the critical first step, and traps placed around the kitchen can help narrow the location. A simple trap made from a glass with a centimeter of apple cider vinegar and a drop of dish soap, covered with plastic wrap punctured with small holes, attracts and drowns adults. Placing individual traps in different areas of the kitchen and counting catches after 24 hours directs attention toward the highest-activity zone and the breeding site most likely nearby.

Inspect every potential site systematically: the fruit bowl, the compost bin, the recycling bin, every drain, the floor under and behind the refrigerator and dishwasher, and any stored vegetables. Remove, clean, or relocate each source as it is found.

Eliminating Breeding Sources

Removing the breeding source stops new adults from emerging, which is the only way to reduce the population. Overripe fruit should be discarded or refrigerated. Recycling bins should be rinsed thoroughly with hot water and dried. Compost bins stored indoors should be emptied frequently and the interior wiped clean.

Drain cleaning addresses the biofilm source. A stiff drain brush followed by boiling water poured slowly down the drain degrades the biofilm mechanically and thermally. Enzymatic drain cleaners such as Bio-Clean or similar products that contain bacterial cultures and enzymes break down organic matter in the drain over several days and are more effective at fully clearing biofilm than chemical drain openers, which are primarily effective against grease and hair clogs rather than biological film. Repeat the enzymatic treatment every few days for two weeks to eliminate successive generations of larvae.

Trapping Adult Flies

Adult fly traps capture the existing adult population while the breeding source is being eliminated. The apple cider vinegar trap described above is effective and costs nothing. Commercial sticky traps and small funnel traps baited with fruit fly attractant perform similarly and have the advantage of a more contained design that keeps dead flies out of view.

Red wine left in an almost-empty bottle works as an attractant, as does a piece of very ripe banana. Traps positioned at counter height near the highest-activity area capture the most adults. Traps do not resolve an infestation on their own but reduce the nuisance of flying adults during the two to three weeks it takes for the breeding population to decline after the source is removed.

Preventing Fruit Flies from Returning

The conditions that allow fruit flies to establish are always the same: moist, fermenting organic matter in a warm, enclosed or sheltered location. Storing all fruit in the refrigerator during warm months rather than on the counter eliminates the most common initiation site. Emptying and rinsing the kitchen compost bin every one to two days prevents fermenting material from accumulating. Rinsing all recyclables before placing them in the bin and keeping the bin clean removes the fermented residue that sustains breeding between batches. Running enzymatic drain cleaner monthly as a maintenance treatment prevents biofilm from rebuilding to the point where it supports a breeding population.

Fruit flies can also enter from outside on produce brought in from the garden or from a grocery store. Inspecting produce for damage before storing it and refrigerating any items that show soft spots or skin breaks removes the initiation source before it can establish a breeding cycle indoors.