How to Get Rid of Fruit Flies: Complete Guide for Homeowners

Last updated: March 4, 2026

Knowing how to get rid of fruit flies requires more than setting a trap. These small insects breed rapidly, laying eggs directly on fermenting organic matter, and a single overlooked food source can sustain an infestation for weeks. Fruit flies (Drosophila melanogaster) complete their life cycle from egg to adult in as few as eight days, which explains why populations seem to explode almost overnight. The only reliable way to eliminate them is to find and remove every breeding site while trapping the adults already present.

This guide covers the full process: understanding the fruit fly life cycle, distinguishing fruit flies from drain flies and fungus gnats, locating hidden breeding sources, setting effective traps, and preventing future infestations. For a broader overview of pest control costs, see our pest control cost guide.

The Fruit Fly Life Cycle (Why They Multiply So Fast)

Fruit flies reproduce at a pace that few other household insects can match. A single female can lay up to 500 eggs over her lifetime, depositing them in batches on the surface of moist, fermenting organic material. At room temperature, eggs hatch within 24 to 30 hours.

After hatching, larvae feed on the fermenting material for four to five days before pupating. The pupal stage lasts another four to five days, after which adults emerge ready to mate within hours. From egg to reproducing adult, the entire cycle takes roughly eight to ten days under warm conditions.

This rapid turnover is why a small problem becomes a large one so quickly. By the time most homeowners notice fruit flies, there are already multiple generations breeding simultaneously. Trapping adults slows the population but does not stop it. Only eliminating breeding sites ends the infestation.

Fruit Flies vs Drain Flies vs Fungus Gnats

Misidentifying the insect leads to ineffective treatment. All three species are small and often described simply as "tiny flies," but their behaviors, breeding sites, and solutions are quite different.

Insect Appearance Where Found Primary Breeding Site
Fruit fly Tan or brown, red eyes, about 1/8 inch long Countertops, produce bowls, garbage, recycling Fermenting produce, spilled liquids, drain film
Drain fly Moth-like, fuzzy wings, gray or tan, 1/5 inch long Walls near drains, pipes, bathrooms Organic slime inside slow or seldom-used drains
Fungus gnat Slender, dark, long legs, resembles a tiny mosquito Near houseplants, windows, soil Moist potting soil with organic matter

The location of activity is the most useful clue. If small flies are concentrated around fruit, kitchen bins, or alcohol, fruit flies are the likely culprit. If they are resting on walls near sink or floor drains, drain flies are the more probable cause. If they appear around houseplants and near windows, fungus gnats are likely the problem. For help with the latter, see our guide on how to get rid of gnats.

Finding the Breeding Source

Locating and eliminating every breeding site is the single most important step in resolving a fruit fly problem. Traps alone will not end an infestation if breeding continues uninterrupted. Fruit flies do not need much: a thin film of fermented liquid or a small piece of overripe produce is sufficient to support egg-laying.

Overripe or forgotten produce

This is the most common breeding site. Check all produce stored at room temperature, including fruit bowls, onion storage, and potatoes. Look for items that may have rolled under appliances or been pushed to the back of pantry shelves. Even a single overripe tomato or soft spot on a banana is enough to support hundreds of eggs.

Recycling bins

Bottles and cans with residual liquid or food film are a major and frequently overlooked breeding source. Rinsing recyclables before placing them in the bin is standard advice, but even a brief rinse often leaves enough residue. Empty and clean recycling bins thoroughly with hot soapy water and allow them to dry completely.

Kitchen drains

Organic matter accumulates inside drains over time, forming a slick biofilm that fruit flies (and drain flies) can breed in. Pour hot water down the drain and scrub the interior of the drain opening with a bottle brush. Follow up with a drain enzyme cleaner, which breaks down organic buildup without damaging pipes. Avoid using bleach as a drain treatment, as it evaporates too quickly to penetrate deep biofilm.

Compost bins and mop buckets

Indoor compost containers need to be emptied frequently during warm months. A countertop compost bin that goes uncollected for several days in summer provides ideal fruit fly breeding conditions. Mop buckets with standing liquid left in a utility closet are another common but unexpected source. Both should be emptied and cleaned regularly.

Spilled liquids under appliances

Juice, wine, beer, or soda that has seeped under a refrigerator, stove, or dishwasher can ferment and attract fruit flies. Pull appliances out periodically and clean the floor underneath. Bar areas and under-counter wine storage should also be inspected for sticky residue.

DIY Methods to Eliminate Fruit Flies

Effective DIY treatment combines source elimination with adult trapping. Focusing on traps alone is a common mistake that keeps an infestation going indefinitely.

Apple cider vinegar trap

Pour about an inch of apple cider vinegar into a small glass or jar. Add two to three drops of dish soap and stir gently. The vinegar attracts fruit flies, while the soap breaks surface tension so they cannot escape. Place several traps wherever fly activity is highest. Replace the liquid every few days as it becomes saturated with dead flies.

Red wine trap

A nearly empty bottle of red wine works as an effective trap on its own. Fruit flies are drawn to the fermented smell, enter the bottle, and cannot find their way out. Leave the bottle overnight near an area of heavy activity. This method requires no setup and uses material that would otherwise be discarded.

Commercial fruit fly traps

Store-bought traps using attractant-based lures (such as TERRO Fruit Fly Traps or Aunt Fannie's FlyPunch) are more discreet than homemade options and work effectively. They use non-toxic attractants and can be placed on countertops without concern about spills. Replace them according to package directions, typically every 30 days.

Cleaning drains with enzyme cleaner

Pour an enzyme-based drain cleaner into all kitchen and bathroom drains according to the product instructions. Allow it to sit overnight without running water. Repeat every few days for one to two weeks to fully break down the biofilm that fruit flies use as a breeding site. Enzyme cleaners are available at most grocery and hardware stores.

Remove all exposed food sources

Move all ripe or overripe produce into the refrigerator for the duration of the treatment period. Store onions, potatoes, and garlic in sealed containers or the refrigerator temporarily. Keep garbage cans covered and empty them daily. Wipe down countertops after food preparation and address any spills immediately.

How Long Elimination Takes

When all breeding sources are eliminated and traps are in place, most infestations resolve within one to two weeks. The timeline reflects the time required for existing eggs and larvae to complete their development and be trapped as adults, combined with the decline in new egg-laying as food sources are removed.

If fly activity has not dropped noticeably after two weeks, there is almost certainly a breeding source that has not been found. Common missed sources include drain biofilm in a bathroom that is not frequently used, a forgotten produce item, or liquid residue under a refrigerator or dishwasher. A methodical room-by-room inspection at that point is more productive than adding more traps.

When It Is Actually a Drain Fly Problem

Drain flies are frequently mistaken for fruit flies, especially when homeowners focus treatment on kitchen areas and see no improvement. If small flies continue to appear near sinks, bathtubs, floor drains, or basement utility drains despite thorough kitchen sanitation, drain flies are the more likely cause.

The simplest test is to cover drain openings with a piece of tape (sticky side down) overnight. If small flies are found on the tape in the morning, the drain is confirmed as a breeding source. Drain fly treatment centers on breaking down and removing the organic slime layer inside the pipe rather than on trapping adult flies.

DIY enzyme treatments resolve many drain fly problems with consistent use over two to three weeks. However, drains with heavy buildup, particularly in older pipes or drains that receive little water flow, may require professional drain cleaning. A plumber or pest control company with drain-cleaning capabilities can use mechanical cleaning or commercial biological products to clear the pipe thoroughly. For more guidance on determining when professional help is appropriate, see our article on when to call an exterminator.

Prevention Tips

Once an infestation is cleared, a few consistent habits prevent fruit flies from re-establishing.

  • Refrigerate ripe produce. Fruit that is at or past peak ripeness is the primary breeding site. Storing it in the refrigerator removes the food source entirely. Consume produce quickly or refrigerate it once it begins to soften.
  • Rinse all recyclables before binning them. A quick rinse of bottles, cans, and jars removes the fermented residue that fruit flies use for breeding. This single habit significantly reduces the risk of recurring infestations.
  • Empty kitchen garbage daily during warm months. Warm temperatures accelerate both food fermentation and the fruit fly life cycle. In summer, a kitchen garbage can that sits for several days provides enough material to sustain breeding.
  • Clean drains monthly with enzyme cleaner. A monthly preventive treatment keeps biofilm from accumulating inside drains. This is faster and easier than addressing an active infestation after it develops.
  • Wipe down counters and under appliances regularly. Removing sticky residue from countertops, backsplashes, and the floor under appliances eliminates micro-scale food sources that are easy to overlook.
  • Keep compost bins tightly sealed and empty them frequently. If you use an indoor compost container, empty it at least every two to three days during summer and clean the container with hot soapy water weekly.

For a broader overview of professional pest control services and pricing, visit our pest control cost guide.

Frequently Asked Questions

How long does it take to get rid of fruit flies?
Most fruit fly infestations clear up within one to two weeks once the breeding source is removed and traps are set. The key is eliminating every food source and harborage site simultaneously. If flies persist beyond two weeks, there is likely a hidden source, such as a drain or forgotten produce, that still needs to be addressed.
What is the best homemade fruit fly trap?
A small glass or jar with apple cider vinegar and a few drops of dish soap is the most reliable DIY trap. The vinegar attracts fruit flies, and the soap breaks the surface tension so they sink and drown. Place several traps near known activity areas and replace the liquid every few days to keep it effective.
Why do I have fruit flies when I have no fruit out?
Fruit flies breed in far more than just fresh produce. Common hidden sources include drains with organic buildup, recycling bins with residue on bottles and cans, mop buckets with standing liquid, compost containers, and even spilled juice or wine trapped under appliances. Inspect all of these areas if you cannot locate an obvious source.
How do I tell the difference between fruit flies and drain flies?
Fruit flies are small and tan or brown with red eyes, and they hover around produce, bins, and countertops. Drain flies are slightly larger, moth-like in appearance, and tend to rest on walls near drains and pipes. If flies are concentrated near sink or floor drains rather than food areas, drain flies are the more likely culprit.
Do I need a pest control professional for fruit flies?
The vast majority of fruit fly infestations can be resolved without professional help through thorough cleaning and trapping. Professional help becomes worth considering when flies persist despite your best efforts, or when drain flies are the true cause and require enzyme treatments or plumbing inspection to fully resolve. For guidance on when to involve a professional, see our article on when to call an exterminator.
J
Written by James

James has spent over 25 years in the pest control industry. He founded Pest Control Pricing to give homeowners transparent, research-backed cost data so they can make informed decisions and avoid overpaying.

Get Pest Control Pricing Estimates

Connect with top-rated local pros. Compare prices and save.

No-obligation pricing estimates. Your information is secure.

OR

Talk to a pest control expert now

(866) 332-0675

No-obligation consultation

Call (866) 332-0675