Odors and household pests

How to get rid of fruit flies: find the source, then trap the rest

To get rid of fruit flies, find what they are breeding in and remove it: overripe produce, a forgotten potato or onion, sticky recycling, a dirty trash can or a drain. Then catch the adults with a jar of apple cider vinegar and a drop of dish soap. Traps alone will not end it while the source is still there.

Written by BroombookPublished · Updated 8 steps Easy

As an Amazon Associate, Broombook earns from qualifying purchases.

At a glance

Time
45 minutes to search and clean, plus 1 to 2 weeks of trapping
Difficulty
Easy
How often
Check produce and the trash every few days in late summer and fall, when fruit flies peak

What you need

  • Apple cider vinegar (about 1/2 cup per trap)
  • Dish soap
  • Small jars or glasses
  • Plastic wrap and rubber bands, or a paper funnel
  • Clear plastic food storage bags and tape
  • Trash bags
  • Stiff drain brush
Products that help
On this page

Step by step: how to get rid of fruit flies

  1. 1

    Hunt down the breeding source

    Check every place fermenting food can hide: the fruit bowl, bags of potatoes and onions, the pantry floor, under the fridge and stove, the recycling bin and the bottom of the trash can. One rotting potato or a juice spill under the fridge can breed thousands of flies. Look for soft, leaking or moldy produce and sticky residue.

  2. 2

    Throw out or refrigerate ripe produce

    Bag and remove anything rotting, and take it outside, not just to the kitchen trash. Eat, refrigerate or freeze ripe fruit. Cut bruised or split spots off fruit you keep, because eggs and larvae stay near the damaged surface.

  3. 3

    Empty and wash the trash and recycling

    Take the trash out, then wash the inside of the can with hot soapy water, paying attention to the bottom where liners leak. Rinse bottles, cans and jars before they go in the recycling. Leave the can to dry before you put in a new bag.

  4. 4

    Test the drains overnight

    Tape a clear plastic food storage bag over the kitchen sink drain and the garbage disposal opening before bed. If flies are breeding in the pipe, adults will be trapped in the bag by morning. If the bag stays empty, the drain is not your source.

  5. 5

    Scrub any drain that tested positive

    Remove the drain stopper and scrub inside the pipe with a stiff drain brush to break up the slimy film the larvae feed on. Run hot water for a minute afterward. For a garbage disposal, scrub under the rubber splash guard, where food film builds up.

  6. 6

    Set apple cider vinegar traps

    Pour about 1/2 cup of apple cider vinegar into a jar and add one drop of dish soap so the flies sink. Cover the top with plastic wrap, secure it with a rubber band and poke a few small holes, or roll a paper funnel into the jar. Put one trap wherever you see flies; you should see a catch within a day.

  7. 7

    Replace sponges and dry the mops

    Wash damp mops, rags and dish towels, wring them hard and hang them to dry. A sour sponge or a mop left in a bucket can hold enough fermenting film to breed fruit flies. Swap out old sponges.

  8. 8

    Keep trapping for two weeks

    Fruit flies go from egg to adult in about a week, so a few will keep appearing for several days after you remove the source. Refresh the vinegar every few days. If the catch is still rising after a week, you have missed a breeding site; repeat the search.

Is it a fruit fly, a fungus gnat or a drain fly?

Fruit flies are tan with red eyes and hang around food and trash; fungus gnats are black, slender and stay near houseplants; drain flies are fuzzy, gray and rest on bathroom walls. The fix depends on which one you have, so look closely at one that has landed before you start.

InsectWhat it looks likeWhere you see itWhere it breeds
Fruit flyAbout 1/8 inch, tan front and darker rear, usually red eyes, stout bodyFruit bowl, trash, recycling, kitchen sinkFermenting produce, spills, sticky containers, sometimes drains
Fungus gnat1/16 to 1/8 inch, black, slender, long legs, looks like a tiny mosquitoHouseplants, windows, around screens and lampsDamp potting soil
Drain flyUp to about 1/5 inch, fuzzy, gray, wings held like a roof or flat like a mothBathroom walls, tubs, showers, basement floor drainsSlime inside drains and overflow pipes

Texas A&M AgriLife Extension notes that each small indoor fly breeds in different places, so identifying the fly is the first step. If yours are black and circling a plant, read how to get rid of fungus gnats. If they are fuzzy and parked by the shower, go to how to get rid of drain flies. Not sure at all? Our guide to getting rid of gnats in the house walks through all three.

Where do fruit flies come from in a clean kitchen?

Fruit flies arrive on produce from the store or garden, or fly in through screens, and then breed in any moist, fermenting film. A kitchen can look clean and still have one hidden source.

The University of Kentucky’s fruit fly fact sheet says a female can lay about 500 eggs and the whole life cycle can finish in about a week. It lists drains, garbage disposals, empty bottles and cans, trash containers, mops and cleaning rags as breeding sites, besides the fruit itself. Places worth checking:

  • A bag of potatoes or onions in the pantry or a closet, with one soft one at the bottom
  • Juice, wine or soda spilled under the fridge, stove or toaster
  • The recycling bin, especially unrinsed beer and wine bottles
  • The wet bottom of a trash can under a leaking liner
  • Loose lids on vinegar, cider, kombucha or homebrew containers
  • The rubber splash guard of a garbage disposal and the sink drain
  • Countertop compost bins with no tight lid

If your disposal or drains smell sour, our guide to cleaning a garbage disposal covers that job in detail.

How fast do fruit flies multiply?

Fast enough that a few flies turn into a cloud in about a week of warm weather. Colorado State University’s fact sheet on small fruit flies lays out the timeline:

  1. Females lay eggs directly on fermenting food or around its edges, and the eggs hatch in 1 to 2 days.
  2. The larvae feed on the surface of the food for about 5 to 6 days at summer temperatures.
  3. They then crawl away to a somewhat drier spot to pupate.
  4. At 85°F, the whole cycle from egg to adult can take as little as 8 days.

Three things follow from that for your kitchen:

  • Because larvae leave the food to pupate, wipe the area around a rotten item too: the inside of the fruit bowl, the shelf under the potato bag, the rim and floor of the trash can.
  • Warm kitchens speed up every stage, so keep produce in the fridge during hot spells.
  • The same fact sheet says an infestation ends when the remaining adults die, about 2 weeks after breeding stops. Colorado State’s Flies in the Home guide suggests eating, covering or refrigerating all susceptible fruit for at least a week while that happens.

Which homemade fruit fly trap works best?

The best trap pairs a strong fermented smell with an entrance flies can get into but not out of. Extension services describe a few versions that work, and they all use things you already have.

TrapHow to make itWhy it works
Vinegar and soap jarCider vinegar and a drop of dish soap in a jar, covered with plastic wrap with a small hole poked in itSoap breaks the surface so flies that land sink; the small hole keeps them in
Paper cone jarA few ounces of bait in the bottom of a jar, with a rolled paper cone set in the top, narrow end downFlies follow the smell down the cone and rarely find the small opening again
Ready-made trapA store-bought trap with a food-based lureTidy and spill-proof, but it catches adults only, like the others

The jar with plastic wrap follows the University of Maryland Extension; the University of Kentucky’s small flies fact sheet describes a paper funnel in a jar baited with a few ounces of cider vinegar. For bait, Colorado State lists cider vinegar, red wine and mashed banana mixed with beer as highly attractive to fruit flies.

  • Put each trap right where the flies hover, not across the room. Several small traps beat one big one.
  • Refresh the bait every few days and empty used traps outside.
  • Throw out a fruit-baited trap after a few days, before the bait itself starts breeding flies.

Why is my fruit fly trap not catching anything?

Usually because the trap is in the wrong place, the flies can get back out, or they are not fruit flies at all. Run through these checks before you give up on it.

  • The source is still there. A trap that fills up every day means flies are still hatching nearby. The University of Kentucky notes that killing adult flies usually gives only temporary relief; you have to remove where the larvae live.
  • No soap, or holes too big. Without soap, flies land, drink and leave. If you can fit a pencil through the holes in the wrap, make them smaller.
  • Competing smells. A trap next to a full fruit bowl or an open trash can loses. Clear the counter so the trap is the strongest smell in the room.
  • Wrong fly. Vinegar traps catch fungus gnats from houseplants and drain flies from the shower poorly. If your flies are black and slender or fuzzy and gray, go to our guide to getting rid of gnats in the house to identify them.

Should you spray insecticide for fruit flies?

Usually not: spraying the adults does nothing about the eggs and larvae in the source, so new flies keep emerging. Clean out the source first and use traps for the rest.

The Kentucky fact sheet says that once breeding sites are gone, a pyrethrum-based aerosol can be used to knock down remaining adults, but that the problem continues no matter how often you spray if the source stays. If you do use a spray, pick one whose label allows indoor use in kitchens, keep it off food, dishes and counters, and follow the directions exactly. The EPA points out that the pesticide label is legally enforceable: using a product in a way the label does not allow is against federal law.

How to keep fruit flies from coming back

Keep ripe produce cold, keep containers clean, and keep the screens tight. Fruit flies need only a thin film of fermenting food to start again.

  • Store bananas, tomatoes and stone fruit in the fridge once they are ripe, and check onion and potato bags weekly.
  • Rinse jars, bottles and cans before recycling, as the University of Maryland Extension advises, and empty the recycling often.
  • Take kitchen trash out daily in late summer and fall, and wash the can monthly.
  • Keep tight-fitting window screens in good repair; Kentucky recommends 16 mesh.
  • Seal home canning, cider, wine and beer containers well, since flies lay eggs under loose lids.

Mistakes to avoid

  • Setting traps but leaving the rotting onion, the sticky recycling or the dirty drain that is producing the flies.
  • Throwing rotten fruit in the kitchen trash and leaving the bag there overnight.
  • Using vinegar without soap or a lid, so flies land, drink and fly away again.
  • Stopping after two days; eggs already laid keep hatching for about a week.
  • Pouring bleach down the drain, which runs past the slime the larvae live in without removing it.
  • Spraying insecticide near open food or on counters, against the label.
  • Leaving a banana or wine trap out for a week, until the bait becomes a new breeding spot.

Products that make this easier

Optional. Everything above works with basic supplies; these just save time or effort.

  • Ready-made trap

    TERRO Fruit Fly Trap

    A small apple-shaped trap with a food-based lure that sits neatly by the fruit bowl. It catches adults only, so you still need to remove the source.

    See it on Amazon
  • DIY trap bait

    Bragg Organic Apple Cider Vinegar

    Raw cider vinegar smells strongly of fermenting fruit, which is exactly what draws fruit flies. Any cider vinegar works; this one is easy to find.

    See it on Amazon
  • For homemade traps

    Ball Regular Mouth Mason Jars (8 oz)

    Small jars make neat, stable traps you can set on a counter or windowsill and wash and reuse.

    See it on Amazon
  • Keeps scraps sealed

    OXO Good Grips Easy-Clean Compost Bin

    A lidded countertop bin keeps food scraps from becoming a nursery. Empty it every day or two in warm weather, or flies will find it anyway.

    See it on Amazon

As an Amazon Associate, Broombook earns from qualifying purchases. Links open the product on Amazon, where sizes, sellers and prices change.

FAQ

Frequently asked questions

How long does it take to get rid of fruit flies?

Once the source is gone, most people see the numbers drop within two or three days and the flies gone in one to two weeks, because eggs already laid still hatch.

Why do I have fruit flies but no fruit?

They also breed in drains, garbage disposals, recycling, trash can bottoms, spilled juice and damp mops. Tape a clear bag over each drain overnight to test it.

Does apple cider vinegar or wine work better in a trap?

Both attract fruit flies because they smell of fermentation. Cider vinegar is cheaper; add a drop of dish soap either way so the flies sink instead of drinking and leaving.

Do fruit flies bite?

No. Fruit flies do not bite, but they can carry bacteria from garbage onto food and counters, so it is worth clearing them out.

Can fruit flies live in a drain?

Yes. Fruit flies can breed in the slimy film inside kitchen drains and garbage disposals. Scrub the pipe with a drain brush; pouring bleach in rarely removes that film.

Sources

  1. University of Kentucky Entomology: Fruit Flies (ENTFACT-621)
  2. University of Kentucky Entomology: Small flies (ENTFACT-657)
  3. Colorado State University Extension: Small fruit flies (vinegar flies)
  4. Colorado State University Extension: Flies in the home
  5. University of Maryland Extension: Fruit flies
  6. Texas A&M AgriLife Extension: Indoor flies and their control
  7. US EPA: Introduction to pesticide labels

General cleaning information. Always follow the care label and your manufacturer’s instructions, and test any cleaner on a hidden spot first.