Fruit Flies: Where They Come From and How to Get Rid of Them

Fruit flies breed in fermenting fruit, drains, trash and recycling. Learn where they come from, how to find the breeding site, which vinegar trap works and how to keep them from coming back.

Fruit flies are tiny tan flies, about 1/8 inch long with red eyes, that breed in fermenting fruit, drains, trash and recycling. They ride in as eggs on produce or slip through window screens. One female can lay about 500 eggs, and egg to adult takes about a week. To get rid of them, find and remove what they are breeding in, then catch the leftover adults with a cider vinegar trap. Sprays alone will not end an infestation.

This guide draws on fact sheets from 11 US university extension services and our own count of iNaturalist records. It is educational, not professional pest-control advice.

Key Takeaways

  • Fruit flies need only a moist film of fermenting food to breed, so a drain, a mop or a forgotten onion can keep them going with no fruit in sight.
  • Removing the breeding site is the fix. Traps and sprays only catch adults already flying.
  • The standard extension trap is cider vinegar and a drop of dish soap under a paper funnel or pierced plastic wrap.
  • Red eyes and a tan body mean fruit fly. Fuzzy flies near drains are drain flies; dark, long-legged flies at houseplants are fungus gnats.
  • Spotted wing drosophila, the vinegar fly that attacks garden berries, peaks in fall: 76.1% of its US iNaturalist records fall between August and November.

Table of Contents

What Are Fruit Flies?

The flies over your fruit bowl belong to the family Drosophilidae, also called vinegar or pomace flies. The best known is Drosophila melanogaster, the fly used in genetics labs. The University of Kentucky describes adults as about 1/8 inch long, usually with red eyes, a tan front half and a black rear. Texas A&M adds that black-eyed “dark-eyed fruit flies” breed more often in drains.

Common fruit fly, Drosophila melanogaster, with bright red eyes and a tan body, about 1/8 inch long
The common fruit fly: red eyes, tan to brown body, about 1/8 inch long. Photo: Alexis, via Wikimedia Commons (iNaturalist), CC BY 4.0, resized.

They differ from the larger tephritid fruit flies. UC IPM explains that tephritids are about 1/4 inch long and attack fruit crops, while the kitchen kind mostly feeds in damaged, overripe fruit.

Why fruit flies love vinegar

Fruit fly larvae feed on the yeasts in fermenting food, and adults follow its smell. In a 2010 wind-tunnel study in the Journal of Chemical Ecology, Paul Becher and colleagues found that vinegar odor drew 62% of hungry flies within 15 minutes, and that acetic acid, the main volatile in vinegar, attracted them on its own.

What the video covers: The American Chemical Society’s Reactions series (3 minutes 16 seconds) explains that fruit flies find food by smell, so vinegar beats honey as bait. Its advice: remove ripe food, then set a vinegar jar with a funnel or pierced plastic wrap. (Summarized from the PBS transcript.)

Where Do Fruit Flies Come From?

Fruit flies arrive three ways: as unseen eggs and larvae on store produce such as bananas, potatoes and onions or on garden tomatoes and melons (Kentucky; Nebraska Extension), as adults through doors and screens, or from an indoor breeding site that has been producing flies for a while.

“They can fly in doors when we come and go, hitch rides home on ripe fruit, and are even small enough to enter through window screens.”

Mike Merchant, PhD, urban entomologist, Texas A&M AgriLife Extension, quoted in “How to get rid of fruit flies in your house,” AgriLife Today, 2020

Fruit need not be present at all. Kentucky says all fruit flies need is “a moist film of fermenting material”; one forgotten rotting potato or onion, or juice spilled under the refrigerator, can breed thousands. Iowa State calls a slow-moving or seldom-used drain with slime above the water line the most likely home breeding site. This checklist combines the sites named in seven extension fact sheets:

Where to lookWhat they breed inNamed by
Fruit bowl, countersOverripe or damaged fruit and tomatoesKentucky, Maryland, Wisconsin
Pantry, cabinetsRotting potatoes and onionsKentucky, Wisconsin, Texas A&M
Sink, tub and floor drainsSlime film above the water lineIowa State, Kentucky
Garbage disposalFood residueKentucky, Nebraska
Trash can bottomLeaked liquids and caked food under the linerTexas A&M, Wisconsin
Recycling binUnrinsed bottles and cans (old ketchup bottles are a common source)Kentucky, Wisconsin, Colorado State
Mops, rags, towelsSour, damp fabricKentucky, Maryland, Wisconsin
Under appliancesSpilled juice, refrigerator drain pans, lost peels and apple coresKentucky, Wisconsin, Iowa State

How to Get Rid of Fruit Flies

Every extension source gives the same order: find the source, remove it, then mop up the adults.

1. Find the breeding site

Persistent adults mean larvae are developing nearby (Iowa State), so check the places in the table above. To test a drain, Kentucky suggests taping a clear plastic food storage bag over it overnight; adults emerging from inside will be caught.

2. Remove or clean it

Throw out rotting produce or cut away the damaged part; Kentucky notes that larvae feed near the surface. For drains, Iowa State recommends scrubbing the pipe with a stiff brush, pouring boiling water slowly down the sides, or a bacterial drain treatment. Bleach or ammonia gives no benefit, it adds.

3. Trap the adults that are left

Kentucky’s simple trap is a paper funnel set in a jar baited with a few ounces of cider vinegar. Texas A&M says a little yeast makes a bait more attractive, though the smell may bother you indoors.

Homemade fruit fly trap: an orange paper cone set into a jar that holds fermenting kombucha as the bait
A paper funnel trap, here baited with fermenting kombucha; Kentucky’s version uses cider vinegar. Photo: Downtowngal, via Wikimedia Commons, CC BY-SA 3.0, resized.

For a soap trap, pour about an inch of apple cider vinegar into a small jar, add a drop of dish soap, cover it with plastic wrap and poke a few holes in it (Nebraska Extension). Nebraska explains that the soap “acts as a surfactant,” lowering surface tension so flies that land sink.

4. Skip the sprays

A spray kills only the adults in the air at that moment.

“Unless the breeding sites are removed or cleaned, the problem will continue no matter how often insecticides are applied to control the adults.”

Michael F. Potter, Extension Entomologist, University of Kentucky, “ENTFACT-621: Fruit Flies“

UConn Extension says pesticides are “not needed or recommended” for fruit flies in the home, and Wisconsin notes that pyrethrin sprays give no residual control.

5. Give it a week or two

Nebraska says the remaining adults can take a couple of weeks to die off. Colorado State advises keeping fruit refrigerated for at least a week until they do.

Fruit Fly Traps Compared

These are the homemade traps the extension sources describe, not our own tests.

TrapBaitHow it holds fliesSource
Paper funnel in a jarA few ounces of cider vinegar, or ripe banana or pearFlies enter the funnel but cannot find the way outKentucky, Nebraska, Wisconsin
Plastic wrap with small holesApple cider vinegar and a drop of dish soapFlies crawl in; soap makes them sinkMaryland, Nebraska
Open bowlApple cider vinegar and a few drops of soapFlies that land drownTexas A&M
Old wine bottleThe residue left insideAdults go in after the smell and are caughtWisconsin
Commercial trapLow-odor lureFunnels or small entry portsTexas A&M

Texas A&M notes that fermenting baits may need replacing every few days.

Fruit Flies vs Gnats, Drain Flies and Phorid Flies

Several small flies share kitchens and bathrooms, each breeding somewhere different. A University of Kentucky small-fly fact sheet separates them:

FlyLooksBreeds inFixSource
Fruit fly1/8 in, brown-black, red (sometimes black) eyes; hoversFermenting food, drains, trashRemove the source; vinegar trapKentucky
Fungus gnat1/8 in, slender, black, long legs and antennae, mosquito-likeMoist houseplant soilWater less; better drainageKentucky
Drain (moth) fly1/16 to 3/16 in, fuzzy, wings held roof-like; hopsSlime inside drainsBrush out the film, then hot waterKentucky
Phorid fly1/8 in, humpbacked; runs on surfacesGarbage, drains, appliance leaksFind and remove the sourceKentucky
Drain fly, also called a bathroom moth fly (Clogmia albipunctata), with fuzzy, hairy wings like a tiny moth
A drain fly, or bathroom moth fly (Clogmia albipunctata), with fuzzy wings. Photo: Alex Abair, via Wikimedia Commons (iNaturalist), CC BY 4.0, resized.

Drain flies rest on walls near drains and fly weakly, in short hops. Fungus gnats stay near potting soil and are drawn to windows and screens.

Fungus gnat Bradysia ocellaris, a slender dark fly with long legs and long antennae, unlike a fruit fly
A fungus gnat (Bradysia ocellaris): slender, dark and long-legged. Photo: Janet Graham, via Wikimedia Commons, CC BY 2.0, resized.

Phorid flies are fruit-fly sized but run across surfaces before flying. Texas A&M warns that a leaking sewer line under a building can cause severe indoor infestations. Kentucky adds that many phorids parasitize other insects, including fire ants and bumble bees. One North American phorid, the zombie fly that attacks honey bees, concerns beekeepers.

Phorid fly, also called a scuttle or humpbacked fly (Megaselia scalaris), a small fly that resembles a fruit fly
A phorid or scuttle fly (Megaselia scalaris), photographed in Washington, DC. Photo: Katja Schulz, via Wikimedia Commons, CC BY 2.0, resized.

A fly that bites outdoors is not a fruit fly; see our guide to horse flies and deer flies.

Fruit Fly Life Cycle and Season

Fruit flies pass through egg, larva, pupa and adult, and warmth speeds every stage.

Stage or measureFigureSource
Eggs per femaleAbout 500University of Kentucky
Larval feeding5 to 6 days, then larvae crawl to drier spots to pupateUniversity of Maryland
Egg to adultAbout a week; 8 to 10 days at 77°FUniversity of Kentucky
Egg to adult, by temperature7 days at 82°F; 8.5 days at 77°F; 19 days at 64°F; over 50 days at 54°FWikipedia, citing Ashburner’s Drosophila lab handbooks
Adult lifespanAround one monthUniversity of Kentucky

That speed is why an infestation seems to explode, and why cold works: UConn says keeping produce in the refrigerator keeps eggs from hatching.

Kentucky, Maryland and Colorado State say indoor numbers peak in late summer and fall, as harvest produce comes inside. We tried to check this on iNaturalist, but on 18 November 2026 the US had only 87 research-grade records of the common fruit fly identified to species, too few to chart by month. Of those 87, 48 date from August through November.

How to Prevent Fruit Flies

  • Refrigerate ripe produce, or keep it in sealed containers if it must sit out (Nebraska). Check stored onions and potatoes often.
  • Wash produce with mild soap and water when you bring it home (UConn).
  • Rinse recycling and take it outside every few days; empty the trash at least weekly (Nebraska).
  • Keep compost scraps in the freezer or an outdoor bin, and sanitize trash and recycling containers (Nebraska).
  • Wring out mops and let them dry; damp mops and towels can breed flies (Maryland).
  • Use tight-fitting 16-mesh screens on windows and doors (Kentucky).

If tiny ants are trailing to the sugar bowl too, see our guide to sugar ants.

Spotted Wing Drosophila in Garden Berries

Tiny white larvae inside fresh raspberries, blueberries, blackberries, strawberries or cherries probably mean spotted wing drosophila (Drosophila suzukii), not the kitchen fruit fly. Penn State says it was first detected in the US in 2008. Unlike other vinegar flies, the female uses a saw-like ovipositor to lay eggs in sound, ripening fruit.

Male spotted wing drosophila with a dark spot near the tip of each wing, a fruit fly that attacks ripe berries
A male spotted wing drosophila (Drosophila suzukii) showing its wing spots. Photo: Martin Cooper, via Wikimedia Commons, CC BY 2.0, resized.

Males have a dark spot near the tip of each wing; females have none. Iowa State’s home garden guide and UC IPM recommend:

  • Harvest often, as soon as fruit is nearly ripe.
  • Bag fallen, overripe and infested fruit for the trash; UC IPM says composting or burying is not reliable.
  • Refrigerate fruit soon after picking; Iowa State says chilling slows or may stop larval development.
  • Cover small plantings with netting with openings under 1 mm before fruit begins to ripen.
  • Monitor with a cup trap holding 1 to 2 ounces of apple cider vinegar and a few drops of soap.

Iowa State says infested fruit is safe to eat. UC IPM warns that sprays at harvest will not help, because the larvae are already inside.

Spotted wing drosophila is far better recorded. Its 1,167 US research-grade iNaturalist records peak in September (23.3%) and October (22.8%). August through November hold 76.1% of them, and February through April only 3.4%. These are photo dates, not infestation counts.

Bar chart of US iNaturalist sightings of spotted wing drosophila by month, peaking in September and October
Share of 1,167 US research-grade iNaturalist records of spotted wing drosophila by month. Chart: BeeKeepersRealm, data from iNaturalist.

Fruit Flies, Bees and Beekeepers

Any fermenting jar draws fruit flies. Kentucky warns that if wine, cider or beer containers are not well sealed, fruit flies lay eggs under the lid. When you make mead at home, an airlock lets gas escape and keeps flies out. The open second stage of honey vinegar goes under cloth held tight with a rubber band, and fruit and honey ferments do best under airlock lids.

Never spray insecticide near flowers or feeders to kill fruit flies. It does nothing about the fruit or drain that feeds them, and it can drift onto blooms. Spinosad, one of the two best home-garden choices Iowa State names for spotted wing drosophila, is “very highly toxic to bees” according to the National Pesticide Information Center, though it has little effect once dry. If you must spray berries, follow every bee warning on the label and see our guide to pollinator-safe pest control products.

Mason bee keepers may meet a look-alike: our mason bee guide covers the Houdini fly, a red-eyed, fruit-fly-like pest of nesting cells.

Frequently Asked Questions

Do fruit flies bite?

No. Texas A&M says fruit flies do not bite.

Can fruit flies make you sick?

Rarely. Minnesota says they are generally not a health problem, but Kentucky notes they can carry bacteria onto food.

How long do fruit flies live?

Adults live around one month (University of Kentucky). Egg to adult takes about a week in a warm kitchen.

Why do fruit flies suddenly appear?

Eggs arrive unseen on produce, and a new generation can emerge in about a week, so adults have usually been breeding for a while before you notice them.

Where do fruit flies lay eggs?

Near the surface of fermenting foods and other moist organic material, says Kentucky.

Do fruit flies eventually go away?

Often, yes. Iowa State says many infestations fade on their own without the source ever being found. Removing the source speeds it up.

Are fruit flies attracted to light?

Yes. Iowa State says they are drawn to light and moisture.

Can fruit flies survive in the fridge?

Refrigeration does not suit them. UConn says refrigerated produce keeps eggs from hatching.

Do fruit flies die in winter?

Not indoors. Minnesota says they can occur any time of year and are particularly common in homes during fall and winter.

The Bottom Line

Find what the flies breed in, clean it out, and let a cider vinegar trap catch the rest. If flies persist after two weeks, recheck drains and the trash can. Browse more garden and household insects.

Image credits: featured photo of a common fruit fly on a banana by Sanjay Acharya, via Wikimedia Commons, CC BY-SA 4.0, cropped and resized. Other photos are credited in their captions. Chart by BeeKeepersRealm from iNaturalist data.

Share on Social Media