How to Get Rid of Fruit Flies Fast (and Keep Them Gone)

As an Amazon Associate I earn from qualifying purchases. Our picks are based on specs, expert guidance and verified owner reviews. Learn more.

How to Get Rid of Fruit Flies Fast (and Keep Them Gone)

Quick answer: To get rid of fruit flies, find and remove what they’re breeding in (overripe produce, a sticky drain, a recycling bin, a damp sponge), clean it thoroughly, then trap the adults with a small bowl of apple cider vinegar and a drop of dish soap. Keep traps out for one to two weeks, because eggs already laid will keep hatching after the source is gone.

If you’re looking up how to get rid of fruit flies, you probably have a small cloud hovering over the fruit bowl or the sink, and it seems to double every few days. That’s not your imagination. Fruit flies develop from egg to adult in about a week in a warm kitchen, and each female can lay hundreds of eggs.

The fix is simple once you know the rule: traps catch adults, but only removing the breeding spot ends the problem. This guide shows you how to find it, clean it, and trap what’s left, plus the few products worth buying.

What causes fruit flies?

Fruit flies are drawn to the smell of fermentation. They lay eggs on the surface of moist, sugary, fermenting material, and their tiny larvae feed on the yeast and bacteria growing there. Common breeding spots include:

  • Overripe or damaged produce: bananas, tomatoes, potatoes and onions in the pantry, and anything in a fruit bowl with a soft spot.
  • Kitchen drains and garbage disposals: the slimy film inside the pipe is a perfect nursery.
  • Recycling bins: a few drops of soda, beer, wine or juice in a can or bottle is enough.
  • Trash cans and compost pails, especially the gunk under the bag or on the lid.
  • Damp sponges, dish rags and mops, plus mop buckets left with dirty water.
  • Spills you can’t see: juice under the fridge, behind the stove or under the recycling bin.

They usually arrive as eggs on store-bought produce, or fly in through screens. That’s why a single bag of bananas can start an outbreak.

Fruit flies, drain flies or fungus gnats?

Getting the ID right saves time, because each one breeds in a different place.

PestLooks likeUsually foundWhere it breeds
Fruit flyTan body, often red eyes, about 1/8 inchAround fruit, trash, recyclingFermenting food and sugary residue
Drain flyFuzzy, moth-like gray wingsBathroom and kitchen walls near drainsSlime inside drains
Fungus gnatDark, thin, long-legged, weak flierAround houseplants and windowsDamp potting soil

If you have drain flies or gnats, the same trapping ideas help, but the fix is the drain or the soil, not the fruit bowl.

How to get rid of fruit flies: step by step

Do steps 1 through 4 the same day. Then keep traps out while any eggs and larvae left behind finish hatching.

  1. Hunt down the breeding site. Check the fruit bowl, the potato and onion bin, the recycling, the trash can (including under the bag), the compost pail and anything left in the sink. Look under and behind appliances for spills. To test a drain, tape a clear plastic cup upside down over it overnight, or cover it with clear tape: if flies are stuck inside in the morning, the drain is a source.
  2. Throw out or refrigerate ripe produce. Toss anything soft, bruised or fermenting in an outdoor trash can. Store ripe fruit in the fridge until the outbreak is over, and keep potatoes and onions in a cool, dry spot you check weekly.
  3. Clean every source thoroughly. Rinse recyclables, wash the trash can and compost pail with hot soapy water, replace sponges and dish rags, and wipe up sticky spots on counters, floors and under appliances. The goal is to remove every bit of fermenting residue. If you find a damp, musty spot under the sink while you’re at it, fix the leak and see our guide on how to get rid of mold.
  4. Scrub drains, don’t just pour. Fruit flies breed in the film on the pipe walls, so pouring something down the drain often misses it. Remove the stopper, scrub inside the drain and disposal with a stiff drain brush, then flush with very hot tap water. An enzyme or bacteria-based drain cleaner, used as the label directs, helps break down the remaining film. Clean the disposal’s rubber splash guard too.
  5. Set a DIY vinegar trap. Pour about half an inch of apple cider vinegar into a small bowl or jar and add one drop of dish soap. The vinegar smell attracts them, and the soap breaks the surface tension so they sink instead of landing. Cover with plastic wrap and poke a few small holes, or roll paper into a funnel, if you want to keep flies from escaping. A splash of old wine or beer works too.
  6. Place traps where flies gather. Put one next to the fruit bowl, one by the sink and one near the trash or recycling. Refresh them every two to three days, because a stale trap stops attracting.
  7. Add a plug-in trap if you want more coverage. Light-and-glue traps can help catch adults around the kitchen and pantry, especially overnight. They work best as a supplement to vinegar traps and source removal, not a replacement.
  8. Keep going for one to two weeks. New adults will keep appearing for several days as eggs and larvae finish developing. If the numbers drop steadily, you’ve found the source. If they don’t, go back to step 1: there’s a breeding spot you missed.

Boiling water can soften the joints on PVC drain pipes and cause dangerous splashes, so use very hot tap water on plastic plumbing and keep kids and pets out of the way. If you use an aerosol fly spray, choose one labeled for indoor use on flying insects, follow the label, keep it away from food and dishes, ventilate the room, and keep kids and pets out until it settles. Keep glue cards and liquid traps out of reach of children and pets. Don’t pour bleach down drains to kill fruit flies: it flows past the film they breed in, and it’s dangerous if it mixes with ammonia or acidic cleaners.

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

Once the breeding source is gone, most kitchens are fly-free in one to two weeks. You’ll catch the bulk of the adults in the first two or three days. A few stragglers after that are normal as the last eggs and larvae mature.

Do other home remedies work?

  • Red wine or beer traps: they work well, and many people find old wine even more attractive to fruit flies than vinegar.
  • Rotting fruit in a jar with a paper funnel: effective, but you’re keeping bait around, so empty it outside daily.
  • Plain white vinegar: less attractive than apple cider vinegar. It lacks the fruity, fermented smell they’re after.
  • Essential oils and herbs: there’s little evidence that basil, mint or oils repel fruit flies enough to matter.
  • Fly swatters and handheld zappers: fine for a few flies, but they never reach the source.

The equipment that helps

A DIY vinegar trap is free and often works best for fruit flies. These two plug-in traps are useful add-ons, especially in pantries, around trash areas, or in homes where you’d rather not keep bowls of vinegar on the counter.

Best plug-in flying insect trap

Zevo Flying Insect Trap

Best for: catching fruit flies, gnats and house flies around the kitchen without sprays.

Why we picked it

  • Blue and UV light draws flying insects onto a hidden adhesive cartridge
  • No spray or odor, and the used cartridge is out of sight
  • Strong owner ratings across tens of thousands of reviews

Keep in mind

  • Fruit flies respond more to fermentation smell than light, so vinegar traps often catch more of them
  • Replacement cartridges are an ongoing cost

Check price on Amazon

Best dedicated fruit fly trap

Safer Home Plug-In Fruit Fly Trap

Best for: placing right next to a fruit bowl, sink or trash area.

Why we picked it

  • Compact UV LED design that plugs into a standard outlet near the source
  • Replaceable glue cards make it easy to see what you’re catching
  • Tens of thousands of owner reviews

Keep in mind

  • Works best within a few feet of where flies gather
  • Glue cards need regular replacement, and keep them away from curious pets

Check price on Amazon

Want to know why we don’t recommend bug zappers for most flying insects? Our guide on how to get rid of mosquitoes in yard explains what research shows about light traps and zappers, and our best mosquito trap guide covers outdoor options.

How to keep fruit flies from coming back

  • Refrigerate ripe fruit, especially in summer and early fall, when fruit flies peak.
  • Wash produce when you get home to remove eggs laid at the store, then dry it.
  • Rinse recyclables before they go in the bin, and empty the recycling often.
  • Take out the trash and compost daily during warm months, and wash the cans monthly.
  • Clean drains weekly with a brush and hot water, and run the disposal with plenty of water.
  • Swap sponges and dish rags often, and let them dry between uses.
  • Wipe up spills right away, including under the fridge and stove.
  • Keep window screens in good repair.

Messy kitchens attract more than flies. If you’re seeing droppings or chewed packaging too, see our complete guide on how to get rid of mice, which covers sealing food and entry points. And if a sour smell lingers after you clean, our guide on how to get rid of bad smells in house can help you track it down.

When to call a professional

Most fruit fly problems don’t need a pro. Call a licensed pest control company if flies keep appearing for more than three weeks after you’ve removed every source you can find, if you run a restaurant, bar or food business, or if you see flies coming from walls, floor drains or a crawl space. Persistent flies near a floor drain or in a basement can mean a broken drain line or sewage leak, which calls for a plumber. Large, shiny flies (not tiny fruit flies) appearing suddenly indoors can signal a dead animal in a wall or attic, which a pest pro should find and remove.

Forgotten produce in the crisper drawer feeds fruit flies and odors at the same time: here is how to deep-clean a smelly fridge.

Frequently asked questions

What kills fruit flies instantly?

A vinegar trap with a drop of dish soap kills fruit flies as soon as they land, because the soap makes them sink. An indoor-labeled fly spray also kills adults on contact, but it’s rarely needed and doesn’t touch eggs or larvae. Neither solves the problem on its own: you have to remove and clean the breeding source, or new flies will keep hatching.

Why do I still have fruit flies after cleaning?

Usually because a breeding spot is still active. Common hidden sources are the kitchen drain or disposal, a forgotten potato or onion, the underside of the trash can or recycling bin, a mop or sponge, and spills under appliances. Eggs and larvae left behind also keep hatching for several days, so a few flies for a week after cleaning is normal.

Where do fruit flies come from?

Fruit flies usually come into your home as eggs or larvae on store-bought fruit and vegetables, or they fly in through open doors and gaps in screens when they smell ripening produce. Once inside, they breed in any moist, fermenting material. They don’t appear from nowhere, even though it can feel that way when an outbreak starts overnight.

Does apple cider vinegar really work for fruit flies?

Yes. Apple cider vinegar smells like fermenting fruit, which is exactly what fruit flies look for when they lay eggs. Add a drop of dish soap so they sink when they land, and refresh the trap every two to three days. Plain white vinegar works less well because it doesn’t have the same fruity smell.

How long do fruit flies live?

Adult fruit flies typically live a few weeks, and they can go from egg to adult in about a week at warm room temperatures. Because a single female can lay hundreds of eggs, a small problem grows fast. Removing the breeding source breaks that cycle, which is why numbers drop quickly once you find it.

Are fruit flies harmful?

Fruit flies don’t bite or sting, but they land on garbage, drains and spoiled food and can carry bacteria onto surfaces and fresh food. Throw out produce they’ve been swarming, wash fruit before eating it, and clean counters where they gather. In food businesses, they’re a sanitation issue that inspectors take seriously.

The bottom line

Find the source, clean it, then trap the rest: that’s how to get rid of fruit flies for good, usually within a week or two. Start with a free vinegar trap and add a plug-in trap if you want extra coverage. For bigger kitchen pests and how to keep them out, read our complete guide on how to get rid of mice.