How to Get Rid of Fruit Flies (and Find the Source)

Learn how to get rid of fruit flies fast: find the hidden breeding source, clean drains the right way, set vinegar traps that work, and keep them away.

By

·

·

9–13 minutes
Fruit flies hovering over a bowl of overripe bananas on a kitchen counter in warm window light

You toss the brown bananas, wipe the counter and set out a bowl of vinegar, yet the tiny flies are still hovering over the sink a week later. Fruit flies are one of the most common kitchen pests, and one of the most frustrating, because killing the adults you see does almost nothing if they are still breeding somewhere you have not looked.

This guide shows you how to confirm you are dealing with fruit flies and not drain flies or gnats, how to track down the breeding source, how to clean drains and disposals properly, which DIY traps actually work, and how to keep the flies from coming back.

Quick answer: Find and remove what the flies are breeding in, usually overripe produce, a sticky trash or recycling bin, a slimy drain or disposal, or a sour mop or rag. Scrub drains with a brush instead of just pouring something down them, then catch the remaining adults with a jar of cider vinegar under a paper funnel. Most kitchens are fly-free within one to two weeks once the source is gone.

Make sure they are fruit flies

Several small flies show up in kitchens, and each one breeds in a different place. Fruit flies are about 1/8 inch long, tan in front with a darker rear, and most have bright red eyes, according to the University of Kentucky Entomology fact sheet on fruit flies. They hover slowly around produce, trash and sinks.

FlyHow to recognize itWhere it breedsMain fix
Fruit fly1/8 inch, tan body, usually red eyesRipe or rotting produce, spilled juice, trash, drains, mopsRemove the source, clean drains, vinegar traps
Drain flyFuzzy gray wings that look like a tiny mothSlimy film inside drains and overflowsScrub the drain film with a brush
Fungus gnatSlender, dark, long legs, weak flyerDamp potting soil in houseplantsLet soil dry out, use sticky cards
Phorid flyHumpbacked, runs on surfaces before flyingDecaying organic matter, sometimes a broken drain or sewer lineFind the rotting material; call a plumber if it is under the floor

If the flies cluster around houseplants rather than the fruit bowl, you likely have fungus gnats. If they sit on the bathroom wall near the shower and look furry, they are drain flies. The rest of this guide focuses on fruit flies, though the drain cleaning steps help with drain flies too.

Why fruit flies keep coming back

Fruit flies multiply fast. The University of Kentucky notes that a female can lay about 500 eggs, and the trip from egg to adult takes roughly a week in a warm kitchen. That means a single forgotten onion or a film of juice in the recycling bin can produce a new wave of flies every few days.

They also arrive on their own. Eggs and larvae often come home on ripe produce from the store, and adults slip in through torn or loose screens. That is why a quick spray or trap only gives temporary relief: the flies you kill are replaced by the ones still developing in the source.

Step 1: Find and remove the breeding source

Fruit fly larvae need moist, fermenting organic material. The source is often small and easy to miss, so check every item on this list, not just the fruit bowl.

  1. Produce. Check the fruit bowl, the potato and onion bin, and the back of the pantry. One soft potato or sprouting onion at the bottom of a bag can host hundreds of larvae.
  2. Trash and recycling. Look for sticky residue in the bottom of the kitchen can and in bottles, cans and jars waiting for recycling, including bins in the garage or basement.
  3. Drains and the garbage disposal. Food film inside the pipe and under the disposal’s rubber splash guard is a classic hidden source.
  4. Mops, sponges and rags. A damp mop head or dish rag that smells sour can breed flies.
  5. Spills under and behind appliances. Juice or soda that dripped under the refrigerator, or a dirty drip pan, is easy to overlook.
  6. Fermenting drinks. Open wine, kombucha, cider, homebrew setups and jars of home-canned food with failed seals all attract egg-laying females.
  7. Compost. Countertop compost pails without a tight lid are a frequent culprit.

Throw out anything that is fermenting, take trash and recycling outside, and wash the containers with hot soapy water. Wipe up spills, toss or launder sour rags, and let mop heads dry completely between uses.

Use the bag test on drains

If you have cleared the obvious sources and flies are still appearing near the sink, test the drain. Tape a clear plastic food storage bag over the drain opening and leave it overnight. If you find flies trapped in the bag in the morning, the drain is the breeding site.

Step 2: Clean drains and the garbage disposal

Pouring bleach or boiling water down a drain rarely solves the problem, because it rushes past the gooey film on the pipe walls where larvae live. You need to physically remove that film.

  1. Remove the drain stopper or strainer basket and clean it with hot soapy water.
  2. Run a stiff, long-handled drain brush or a flexible pipe brush down the drain and scrub the walls of the pipe as far as you can reach.
  3. Flush with plenty of hot tap water.
  4. For the garbage disposal, turn off the power at the switch, then lift and scrub the underside of the rubber splash guard, where food collects. Grind a handful of ice and some citrus peels, then flush with cold water.
  5. Follow up with an enzyme or bacteria-based drain gel for a few nights if the label allows it, to break down residue the brush missed.

If the disposal still smells after cleaning, our guide to fixing garbage disposal smells covers deeper cleaning. For a drain that is also slow, try the methods in how to unclog a drain without chemicals, since standing water and gunk feed both clogs and flies.

Safety note: Never mix bleach with vinegar, ammonia or a commercial drain cleaner. These combinations can release toxic gases. If you use any drain product, read the label first, use it alone, ventilate the room and flush thoroughly before trying anything else.

Homemade fruit fly trap made from a glass jar of cider vinegar with a paper funnel

Step 3: Trap the adults

Once the breeding source is gone, traps clean up the adults that are left. Traps alone will not end an infestation, but they speed up the last stretch and show you whether new flies are still appearing.

Vinegar and funnel trap

This is the method the University of Kentucky recommends. Pour a few ounces of apple cider vinegar into a jar, roll a sheet of paper into a cone, and set it in the mouth of the jar with the narrow end pointing down but not touching the liquid. Flies find their way in through the small opening and rarely find their way back out. A slice of banana works as bait too.

Vinegar and dish soap

Fill a small bowl with cider vinegar and stir in a drop of dish soap. The soap breaks the surface tension, so flies that land to drink sink instead of flying away. Cover the bowl with plastic wrap poked with a few small holes if flies seem to be landing and leaving.

Leftover wine or beer

A small amount of red wine or beer in the bottom of a bottle or glass works on the same principle, because fruit flies are drawn to fermentation. Add a drop of dish soap for better results.

Where to put traps

Place traps where you see the most flies, such as beside the fruit bowl, near the sink and next to the trash can. Replace the bait every few days, since old vinegar loses its pull and a trap full of dead flies can become a breeding spot itself.

Tools and materials

  • Apple cider vinegar, dish soap and a few small jars or bowls
  • Paper or plastic wrap for funnel traps
  • Clear plastic food storage bags and tape for the drain test
  • Stiff drain brush or flexible pipe brush
  • Enzyme or bacteria-based drain gel
  • Hot soapy water and a scrub brush for bins
  • Lidded compost pail and a trash can with a tight lid
  • Replacement window screens or a screen repair kit

Step 4: Keep fruit flies from coming back

Prevention is mostly about habits. Fall is peak season, because harvest produce, canning and fermenting projects give flies plenty to work with, so these steps matter most from late summer through the holidays.

  • Refrigerate ripe produce, or eat it within a day or two. Cut away bruised or damaged spots right away.
  • Rinse produce when you bring it home to wash off any eggs.
  • Rinse bottles, cans and jars before they go in the recycling bin.
  • Empty the kitchen trash and compost pail often, and wash the containers monthly.
  • Run the disposal with plenty of water and clean drains once a month.
  • Repair torn screens and make sure they fit tightly. The University of Kentucky suggests 16-mesh screening on windows and doors.
  • Store potatoes and onions in a cool, dry spot and check them weekly.

The same habits help with other kitchen pests. If you also notice tiny moths or webbing in dry goods, see our guide to getting rid of pantry moths.

When to call a pro

Fruit flies are almost always a DIY job, and insecticide sprays only kill the adults in the air without touching the source. Bring in help when the usual steps are not enough:

  • You still see steady numbers of flies two to three weeks after removing every source you can find.
  • Flies come from a floor drain, a basement slab or a wall with no obvious food source, which can mean a broken drain or sewer line. A plumber with a sewer camera is the right first call.
  • Small flies are breeding in several rooms at once, or you suspect a hidden source such as a dead animal or a leak soaking into a cabinet base.

A general pest control visit is typically affordable compared with the cost of chasing the problem for months. According to Bob Vila’s exterminator cost guide, which cites HomeAdvisor data, homeowners typically pay $111 to $261 for an exterminator, with a national average of about $176. A good technician should focus on finding the breeding site rather than spraying the kitchen.

Frequently asked questions

Where do fruit flies come from?

They usually arrive as eggs or larvae on ripe produce from the store, or as adults through gaps in window and door screens. Once inside, they breed in anything moist and fermenting, which is why they seem to appear out of nowhere.

Why do I still have fruit flies after throwing out the fruit?

There is almost always a second source, such as a drain, the disposal splash guard, a recycling bin, a sour mop or a forgotten potato. Larvae already developing in the source will also keep emerging for about a week after you remove it.

Can fruit flies live in drains?

Yes. Fruit flies breed in the slimy film inside sink drains and garbage disposals. Tape a clear bag over the drain overnight to check, and scrub the pipe with a brush rather than relying on bleach or boiling water.

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

Once the source is gone, most kitchens are clear in one to two weeks. You may see a few new adults during that time from larvae that were already developing, so keep traps out until you go several days without catching any.

Are fruit flies harmful?

They do not bite or sting, but they land on garbage and drains and then on food, so they can carry bacteria to fruit and counters. Wash produce and keep food covered while you deal with them.

The bottom line

Getting rid of fruit flies is a search-and-remove job, not a spraying job. Confirm they are fruit flies, hunt down every breeding source from the potato bin to the disposal splash guard, scrub drains instead of just flushing them, and use simple cider vinegar traps to catch the stragglers. Keep ripe produce in the fridge and recycling rinsed, and they will have nowhere to come back to.

About this guide: CozyFixer guides are researched from manufacturer instructions and trusted public sources and reviewed with safety in mind. They are general information, not professional advice. How we create our guides · Disclaimer