Basement to Roof

Home Leaks, Damp and Pests

How to Get Rid of Fruit Flies: Find the Source, Trap the Rest

Updated

A vinegar trap by the sink catches only adults. It pulls in a few dozen flies, and a week later the kitchen is full again. The eggs and larvae are still growing somewhere you haven't found yet.

Five Steps, in Order

  1. Find and remove every breeding source. This step is about 90% of the job.
  2. Clean the places where the source sat. Remove the sticky film that comes with it.
  3. Treat drains if they test positive.
  4. Trap the adults for two weeks while the last ones hatch.
  5. Keep the kitchen dry and produce in the fridge so they don't come back.

If you skip step 1, nothing else on this list will work.

Make Sure They're Fruit Flies

Several small flies get called "fruit flies." The fix depends on which one you have. Larger flies, such as house flies and blow flies, breed in different places and call for a separate plan for flies in the house.

Tiny tan-brown fruit fly with a bright red eye standing on the inside of a banana peel
Tan body, bright red eyes and a fly much smaller than the banana peel fibers around it mark a true fruit fly. Photo: rjp/zimpenfish, CC BY-SA 2.0
Fly What it looks like Where you see it Where it breeds
Fruit fly (Drosophila) About 1/8 inch, tan to light brown body. Most have bright red eyes. Flies slowly. Around fruit, trash, the sink, wine glasses Fermenting produce, spilled juice and drinks, wet organic gunk
Drain fly (moth fly) Fuzzy gray body, wings folded like a roof, looks like a tiny moth Bathroom and kitchen walls near drains, tubs, showers Slime film inside drains and sewer lines
Fungus gnat Slender, dark gray to black, long legs, looks like a tiny mosquito Houseplants and windows Wet potting soil
Phorid fly (humpbacked fly) Small, tan to dark, humpbacked. Tends to run across surfaces instead of flying. Near floor drains, bathrooms, basements Decaying organic matter, sometimes broken drain lines under slabs

If you have red eyes, a tan body, and flies hanging around the fruit bowl or recycling, you have fruit flies. If you see fuzzy gray flies sitting on the shower wall, you have drain flies, and the drain section below is your main fix. If the flies are dark and coming off houseplant soil, you have fungus gnats. Let the soil dry out between waterings and they'll fade out.

Fruit Fly Life Cycle: Why Traps Alone Fail

The common fruit fly breeds fast. At normal room temperature (about 75–80°F):

  • Eggs are laid on the surface of fermenting food. They hatch in about a day.
  • Larvae are tiny white maggots. They feed on the yeast in rotting food for about four days.
  • Pupae form in a slightly drier spot nearby, often the edge of the bin, the rim of a bowl, or the underside of a lid. Adults come out about four days later.
  • Adults can mate and begin laying eggs about two days after they emerge.

That's roughly 8 to 10 days from egg to adult. In a cool house the cycle slows to two or three weeks. In a hot kitchen it can be faster.

A single female can lay several hundred eggs over a life of a few weeks. One overripe banana can produce a swarm in about ten days.

So even after you throw out the source, flies that were already pupating will keep emerging for up to a week. Keep traps out for at least two weeks after the cleanup. If you're still catching new flies after that, you've missed a source.

Where Fruit Flies Actually Breed

When the obvious fruit bowl has been cleared and the flies keep coming, the source is usually one of these:

Produce - Overripe bananas, tomatoes, peaches, grapes, melons, and stone fruit - A rotting potato or onion at the bottom of a bag or bin. This is the most common source in a pantry, and it often smells before you see it. - Garlic, squash, or citrus sitting in a basket for weeks - Forgotten produce in the bottom of the fridge crisper (less common, but it happens)

Drinks and spills - The recycling bin. Beer, wine, soda, and juice residue in cans and bottles is a perfect breeding site. - Spilled juice or soda that ran under the fridge, stove, or dishwasher - Open wine bottles, kombucha, homebrew, cider, and vinegar "mothers" - Sticky film under a coffee maker or juicer

Wet organic gunk - Garbage disposals and kitchen drains, especially the underside of the rubber splash guard - Liquid pooled in the bottom of the trash can, under the bag - Countertop compost buckets - Damp mop heads, rags, and sponges - The drip pan under the refrigerator - Dishwasher filters and the gasket at the bottom of the door - Pet food bowls and spilled wet food - Ice maker and floor drains in commercial or basement spaces

Hunting tip: Go around at night with a flashlight. Adults cluster near where they breed. Look into the bottom of the recycling bin, under the disposal splash guard, and behind the produce baskets.

The Drain Test

You don't need to guess whether a drain is breeding flies. Test it.

Fuzzy gray drain fly with broad hairy, veined wings and beaded antennae resting on a pale off-white surface
Drain flies have a fuzzy gray body and broad, hair-fringed wings. Seeing them near a sink or shower points to a drain worth testing. Photo: Sanjay Acharya, CC BY-SA 3.0
  1. Put a strip of clear packing tape over part of the drain opening, sticky side down. Leave gaps so air can move. Or set a clear plastic cup upside down over the drain.
  2. Leave it overnight.
  3. Check in the morning. Flies stuck to the tape or trapped in the cup mean that drain is a breeding site.

Test every drain that could be involved: kitchen sink, disposal, bathroom sinks, tubs, and floor drains.

The Two-Week Plan

Day 1: Remove and clean

  • Throw out or refrigerate all ripe produce. Bag the trash and take it outside, not just to the garage.
  • Empty and rinse the recycling. Rinse cans and bottles from now on before they go in.
  • Pull out the potato and onion bins and check every piece. Wipe out the bins.
  • Wash the trash can itself, especially the bottom. Let it dry.
  • Clean under and around the fridge, stove, and dishwasher wherever a spill could have run.
  • Replace sponges and wash rags and mop heads hot. Dry them completely before using them again.
  • Run the dishwasher empty after clearing its filter.
  • Empty the fridge drip pan if you can reach it.

Day 1–7: Treat drains (if positive)

Boiling water and bleach are the usual advice, and neither works well. The flies breed in a slimy film stuck to the inside of the pipe. Water and bleach run straight past it.

What works:

  1. Scrub the pipe. Use a long, stiff drain brush (a few dollars at any hardware store). Scrub the drain body and as far down as it reaches, and scrub the underside of the disposal splash guard. This is the step that does most of the work.
  2. Use a bacterial or enzyme drain gel to break down what the brush missed. Professional-grade gels run about $40–$55 per gallon. The usual dose is about 4 ounces per drain, applied at night when the drain won't be used. For an active problem, treat daily or every other day for a week, then every couple of weeks for maintenance. A gallon treats a lot of drains. Smaller retail bottles of drain gel cost less up front and work the same way.
  3. Retest with tape after a week.

Don't mix drain cleaners, and never follow bleach with an ammonia or acid product.

Day 1–14: Trap the adults

Put traps where you see the most flies: next to the sink, the fruit bowl spot, and the trash area. See the trap recipes below.

Day 14: Check

If the traps are only catching a fly or two a day and the number keeps dropping, you're finished. Keep produce in the fridge for another week. If the catch is steady or climbing, there's a source you haven't found. Go back to the source list, and look at the spots that are hard to reach: under appliances, inside cabinet bases, and behind the dishwasher.

Fruit Fly Trap Recipes That Work

Cider vinegar trap (the standard)

  • A small jar, glass, or cup
  • About 1/2 inch of apple cider vinegar (white vinegar doesn't work nearly as well)
  • One drop of dish soap, which breaks the surface tension so the flies sink

Leave it open, or cover the top with plastic wrap and poke several holes with a toothpick. Swap in fresh vinegar every few days. An old jar of vinegar stops attracting flies.

Wine or beer trap

Use the last inch of red wine or beer in the bottle, plus a drop of dish soap. It often works better than vinegar. Leaving an almost-empty wine bottle by the sink works on its own, because the narrow neck acts as a funnel.

Fruit bait cone trap

Put a chunk of overripe banana or a few smashed grapes in a jar. Roll a sheet of paper into a cone with a small opening at the tip (about pencil-width), and set it in the jar mouth, tip down. Flies find their way in and can't find their way out. Empty it within a few days. Otherwise you've built a new breeding site.

Trap tips

  • Use several small traps, not one big one. Fruit flies don't travel far toward bait.
  • Put traps right at the problem spots, low and out of drafts.
  • Smell matters more than looks. Fresh, fermenting bait beats a pretty trap with stale bait.

Store-bought traps

The small plastic apple-shaped traps with a liquid lure work well and are tidy. Current prices are about $7 for a 2-pack and about $17–$20 for a 6-pack. Refill-lure bundles that last several months cost about $11–$13. Each trap lasts about a month.

Sticky yellow cards catch fruit flies too, but they catch fungus gnats better.

Homemade Fruit Fly Spray

A spray bottle of water with a teaspoon or so of dish soap per cup kills fruit flies on contact. So does plain rubbing alcohol. Both are fine for knocking down a cloud over the sink. Keep alcohol away from open flame and test it on finished wood first.

Spraying adults is cleanup only, and it does nothing to the eggs and larvae. Don't spend much time on it.

Aerosol insecticides labeled for flying insects (usually pyrethrins) also kill adults on contact. They're legal to use indoors according to the label, but they have the same limit: they don't touch the breeding site. Keep any spray off food, dishes, and food-prep surfaces.

What Doesn't Work (or Isn't Worth It)

  • Bug bombs and foggers. They don't reach breeding material inside bins, drains, and under appliances. They leave residue all over the kitchen and are a fire risk near pilot lights. Skip them.
  • Bleach down the drain. It flushes through and leaves the slime layer behind.
  • Boiling water alone. It's the same problem, and it can soften PVC joints when it's poured repeatedly.
  • Essential oil sachets and repellents. At best they move flies around. They don't stop breeding.
  • Electric bug zappers. They're poor at drawing fruit flies compared to a fermenting bait.
  • Traps without cleanup. You'll catch flies forever.

When to Call a Pest Control Company

Most home fruit fly problems are solved with the plan above. Call for service if:

  • You've done two full weeks of cleanup and drain work and the flies keep coming.
  • Flies or larvae are coming from somewhere you can't reach: a wall void, under a cabinet base, or a floor drain. A broken drain line under a slab also falls here. It can feed flies for months.
  • It's a restaurant, bar, grocery, or other food business, where health inspections are on the line.

A good technician will spend most of the visit inspecting, not spraying. Expect someone who pulls the kickplates off cabinets, looks under appliances, checks floor drains and floor sinks, and tells you about sanitation fixes. Drain treatments and a targeted space spray may be part of it.

Typical residential pricing runs about $100–$300 for a one-time visit. Large or severe jobs can reach $700 or more. If a company quotes a "fruit fly spray" without inspecting first, keep looking.

Keeping Fruit Flies Out

  • Keep ripe fruit in the fridge, especially in summer and early fall when fruit flies peak.
  • Wash produce when you bring it home. Eggs and larvae often come in on it.
  • Rinse everything that goes into the recycling bin.
  • Take out trash with food in it daily during fly season.
  • Keep a tight lid on the compost bucket and empty it every day or two.
  • Scrub the sink drain and disposal splash guard weekly.
  • Wipe up juice, wine, and soda spills right away, including the drips that run under appliances.
  • Check potatoes and onions weekly. One soft one is enough to start a problem.
  • Keep window screens in good repair. Fruit flies are small enough to get through damaged screening, and some can pass through standard mesh.

Fruit Fly Facts

  • The common fruit fly is Drosophila melanogaster. It's one of the most studied animals in science and has been central to genetics research for over a century.
  • They're drawn to the yeast and fermentation in rotting fruit, not the fruit itself. That's why vinegar, wine, and beer make good bait.
  • They don't bite and they don't sting. They can carry bacteria from garbage and drains onto food surfaces, which is the real reason to deal with them.
  • They don't "come from nowhere." They arrive as eggs on produce or fly in from outside and find something to breed in.
  • Populations peak in late summer and fall, when homes are full of ripe produce and garden harvests.
  • Flies that look slightly larger and darker but are otherwise the same may just be another Drosophila species. They're handled the same way.

Oriental Fruit Fly: A Different Problem

The oriental fruit fly (Bactrocera dorsalis) is not a kitchen pest. It's an invasive agricultural pest, and in the U.S. it's handled by state and federal agriculture agencies, not by homeowners.

How it differs: - It's about the size of a house fly, much bigger than a kitchen fruit fly. It has yellow and dark brown to black markings on the body and clear wings. - Females lay eggs inside fresh fruit on the plant, not in rotting food. The larvae ruin the fruit from the inside. - It attacks hundreds of kinds of fruits and vegetables, including citrus, stone fruit, avocado, tomatoes, peppers, and figs. - It's established in Hawaii. On the mainland it shows up through repeated introductions, mostly in fruit brought in from other countries.

Recent activity: California has had repeated detections. A quarantine in the Jurupa Valley area of Riverside and San Bernardino Counties was set up in September 2025 and lifted in March 2026. New oriental fruit flies were found in the same general area in September and October 2026. A county emergency program now covers parts of Eastvale, Ontario, Fontana, and Jurupa Valley. Quarantine boundaries change, so check with your county agricultural commissioner or state department of agriculture for current status.

If you live in or near a fruit fly quarantine area: - Don't move homegrown fruit or vegetables off your property. Eat them, or dispose of them as directed, usually double-bagged in the trash, not in green waste or compost. - Allow access to agriculture crews who set traps or treat host trees. The treatments are targeted and are the reason quarantines get lifted. - Never bring fruit or vegetables home from abroad or from Hawaii without declaring them. That's how most introductions happen. - If you find maggots inside fresh fruit on a tree in an area with exotic fruit fly activity, bag the fruit and contact your county agricultural commissioner.

A kitchen fruit fly trap won't help with oriental fruit flies, and you shouldn't try to manage them yourself. Report them and let the agriculture program handle it.