How to Get Rid of Fruit Flies: 5 Steps That Actually Work

Fruit flies breed in fermenting food, drains and damp mops. Here is the five-step plan extension entomologists recommend, the trap recipe that works, and how long it takes.

How to Get Rid of Fruit Flies headline beside a jar trap and the 8 to 10 day life cycle
Illustration: Fox Bulletin

Knowing how to get rid of fruit flies comes down to one fact that most quick fixes ignore: the flies you see are not the problem, the place they are breeding is. University of Kentucky entomologists warn that unless every breeding spot is found and cleaned, the problem will continue no matter how often you spray.

That spot is often small. A single rotting potato at the back of a pantry, or juice spilled under the refrigerator, can produce thousands of flies. This guide walks through the five steps extension services recommend in 2026, from identifying the fly to cleaning drains, building a trap that catches dozens a day, and knowing when the last adults should be gone.

How to Get Rid of Fruit Flies in 5 Steps

Here is the short version. Each step gets its own section below with the details that make it work.

  1. Confirm it is a fruit fly. Red eyes and a tan body mean fruit fly; a tiny black mosquito shape near houseplants means fungus gnat, which needs a different fix.
  2. Find and remove every breeding spot. Check produce, trash cans, recycling, drains, mops and the tray under the fridge.
  3. Scrub the drains. Use a stiff brush or a biological drain product. Bleach does not remove the film larvae live in.
  4. Trap the adults. Apple cider vinegar plus a drop of dish soap under plastic wrap with small holes catches the survivors.
  5. Change how you store food and trash. Refrigerate ripe produce, rinse recyclables and hang mops to dry so a new generation cannot start.

With the sources gone, Colorado State University says numbers should fall within several days, and the remaining adults will have died off after about two weeks.

What Fruit Flies Look Like

Side view of an adult fruit fly with bright red eyes, a tan body and an iridescent wing
Image: Penn State Extension

The common household species is Drosophila melanogaster, also called the vinegar fly or pomace fly. Adults are about 1/8 inch (3 mm) long. Penn State Extension describes them as yellowish brown to dark brown with red eyes, and the University of Kentucky notes the front of the body is tan while the rear is black.

Two habits give them away. They hover around fruit bowls, sinks and trash with a quick, erratic flight, and they are small enough to pass through ordinary window screens. Texas A&M AgriLife counts more than 170 species of fruit flies in the U.S. and Canada, but the one in your kitchen is almost always the red-eyed species that feeds on yeast growing in fermenting food.

Fruit Flies vs. Gnats: Four Small Kitchen Flies Compared

Many people searching for a fruit fly fix actually have one of three look-alikes. Each breeds somewhere different, so the wrong diagnosis means cleaning the wrong place. The University of Kentucky small flies fact sheet separates them by size, shape and behavior:

Fly Size How to recognize it Where it breeds
Fruit fly About 1/8 inch (3 mm) Red eyes, tan front, dark-banded rear; hovers around food Fermenting produce, drains, trash, damp mops
Fungus gnat 1/16 to 1/8 inch Slender black body, long legs and antennae; looks like a tiny mosquito Wet potting soil in houseplants
Drain (moth) fly 1/16 to 3/16 inch Fuzzy, moth-like wings held like a roof; moves in short hops Slime film inside drains and condensate pans
Phorid fly About 1/8 inch Humped back, no red eyes; runs across surfaces instead of flying off Drains, garbage, sewage leaks, rotting potatoes
Adult phorid fly with dark eyes and a humped thorax resting on decaying organic matter
Image: NC State Extension

Fungus gnats are the most common mix-up. They stay near houseplants, fly toward windows and screens, and disappear once the top of the potting soil is allowed to dry between waterings. UC IPM also suggests raw potato chunks pressed cut side down into the soil, which draw the larvae out within a few days.

Phorid flies, shown above, are the hardest to beat. NC State Extension notes they lack the red eyes of fruit flies, carry a humped thorax, and a female can lay more than 700 eggs. Because they can breed in a broken sewer line under a slab, a phorid problem that survives a thorough cleaning usually needs a plumber.

Why One Rotten Onion Turns Into Thousands of Fruit Flies

Fruit flies multiply fast because every stage is short. The University of Kentucky says a female lays about 500 eggs, and Ohio State puts the upper limit at 2,000. Eggs hatch in 24 to 30 hours, and the larvae feed for five to six days on yeast in fermenting fluids before crawling somewhere drier to pupate.

At 77 degrees Fahrenheit the whole cycle from egg to adult takes eight to ten days, and adults live around a month. Newly emerged females are ready to mate in about two days. Cooler rooms slow things down: Purdue gives a range of 8 to 20 days depending on air temperature, which is why infestations peak in late summer and early fall when kitchens are warm and garden produce is ripening.

Step 1: Find Every Fruit Fly Breeding Spot

All a fruit fly needs to breed is a moist film of fermenting material. Fruit does not even have to be present. Texas A&M and the University of Kentucky list these as the usual culprits:

  • Overripe bananas, tomatoes, melons, pineapples and strawberries left on the counter
  • Bags of potatoes or onions, where one soft piece at the bottom goes unnoticed
  • The wet bottom of a trash can where a liner leaked
  • Recycling bins with unrinsed wine, beer, soda or ketchup bottles
  • Damp mops, brooms, sponges and dishcloths
  • Slow or rarely used sink, tub and floor drains, plus garbage disposals
  • Spilled juice under the refrigerator and the drip tray beneath it
  • Loose lids on vinegar, wine, cider or home-brew containers

Fall adds its own risk. Kentucky entomologists name squash among the garden produce that starts indoor infestations, and a pumpkin softening on the porch steps or the kitchen counter after you carve a jack-o’-lantern counts. Cut away damaged parts of produce you want to keep, since larvae feed near the surface of the fermenting area.

If the counters are clean and the flies keep coming, test the drains. Tape a clear plastic food bag over each drain and the disposal overnight. Texas A&M suggests a strip of clear packing tape that covers most, but not all, of the opening, because a fully sealed drain has no airflow and flies may not come up. Any flies stuck in the bag or on the tape the next morning mark the source.

Step 2: Clean the Drain the Right Way (Skip the Bleach)

Pouring bleach down a drain is the most common mistake. In its guide to indoor flies and their control, Texas A&M AgriLife calls chlorine bleach or drain cleaner “largely ineffective” at removing the film that larvae live in. Purdue and Iowa State reach the same verdict, and NC State adds that bleach can react dangerously with other compounds in the pipe.

What works is physical removal of the slime layer:

  1. Remove the drain stopper or strainer and clean it separately.
  2. Scrub the inside of the pipe and trap with a long, stiff drain brush.
  3. Flush slowly with hot to boiling water poured down the sides of the pipe.
  4. For drains you cannot reach, use a biological or enzyme drain product and repeat it as the label directs, often over several weeks. Check that it is safe for a septic system first.
  5. Repeat the overnight bag test to confirm the drain is no longer producing flies.

Do the same for anything that holds a damp film: the refrigerator drip tray, the gasket of the dishwasher, cracked floor tiles near the sink, and the rubber splash guard of the garbage disposal.

Step 3: Set a Homemade Fruit Fly Trap

Glass of cider vinegar with a paper funnel inserted and drowned fruit flies at the bottom
Image: Colorado State University

Traps will not solve an infestation on their own, and Texas A&M says they rarely provide adequate control by themselves. Their job is to catch the adults that are already flying while the breeding sites dry up. The version extension services agree on takes two minutes:

  1. Pour about 1/4 cup of apple cider vinegar into a jar or small glass.
  2. Add a few drops of dish soap. Soap breaks the surface tension, so flies that land sink and drown.
  3. Cover the top with plastic wrap held by a rubber band and poke a few small holes, or roll a sheet of paper into a funnel and set it in the jar with the tip just above the liquid.
  4. Place traps wherever flies gather, such as beside the fruit bowl, the sink and the trash can.
  5. Empty and refill every few days. Penn State recommends fresh vinegar at least weekly.

Lid style matters more than most people expect. In a side-by-side test by The Kitchn, a jar with nail holes punched in a metal lid caught at least 50 flies in four days, while a paper cone caught very few. If vinegar is not drawing them, switch the bait: a 2019 Texas A&M student study found a banana outdrew apple cider vinegar, wine and beer. Texas A&M also notes that a pinch of yeast makes any bait stronger, at the cost of a sour smell.

Step 4: Store Produce and Trash So Fruit Flies Cannot Breed

Once the current wave is gone, prevention is mostly about removing the food. Kentucky entomologists say ripe produce should be eaten, thrown out or refrigerated, and Ohio State advises refrigerating exposed fruit and vegetables before fermentation starts. A few habits keep the next generation from getting started:

  • Rinse bottles and cans before they go in the recycling bin, and empty the bin at least weekly.
  • Wash new fruit when you bring it home, since some arrives already carrying eggs.
  • Squeeze out mops and sponges and hang them off the floor to dry.
  • Take compost scraps outside daily and keep the outdoor bin lidded.
  • Seal vinegar, wine, cider and home-brew containers tightly.
  • Fit tight 16-mesh window screens; standard house-fly screening lets fruit flies through.

Keeping the kitchen dry pays off elsewhere too. The same routine that keeps a seasoned cast iron pan rust free, drying things fully before putting them away, also removes the damp films fruit flies need.

Do You Need an Insecticide Spray for Fruit Flies?

Usually not. The EPA’s integrated pest management guidance for child care centers says fly problems are almost always a sanitation problem and pesticides are rarely needed. The University of New Hampshire goes further and does not recommend chemical controls at all, because the flies breed too quickly for sprays to keep up.

If you do use one, a household pyrethrin aerosol will knock down adults, but Ohio State notes it does nothing to the larvae, so the flies return until the source is gone. For drains, Texas A&M points to insect growth regulators such as S-hydroprene, which stop larvae from maturing rather than killing adults. Skip indoor bug zappers: they scatter insect fragments around the room.

How Long It Takes to Get Rid of Fruit Flies

Expect about two weeks from the day the last breeding spot is cleaned. Colorado State says the number of flies should drop within several days, and since no new adults are emerging, the survivors die off over roughly two weeks. Traps speed up the visible part of that decline.

If flies are still appearing after two weeks, something is still breeding. Recheck the drains with the bag test, look under appliances, and inspect the recycling bin and any stored potatoes or onions. Persistent flies without red eyes point to phorid flies or drain flies instead, which the table above helps sort out.

Frequently Asked Questions

Where do fruit flies come from?

They arrive two ways: as eggs on produce you bring home, or as adults flying in through doors and windows. Ohio State notes adults can travel up to 6.5 miles in a day, so a fruit bowl gets found quickly. They then breed in any moist, fermenting material in the house.

How long do fruit flies live?

Adults live around a month at room temperature. The full cycle from egg to adult takes eight to ten days at 77 degrees, so a female laying hundreds of eggs can start a new generation every week and a half.

Does pouring bleach down the drain kill fruit flies?

No. Texas A&M, Purdue and Iowa State all say bleach does not remove the slime layer in drains where larvae live. Scrub the pipe with a stiff brush and flush with hot water, or use a biological drain product.

Why does a fruit fly trap need dish soap?

Vinegar alone has enough surface tension for flies to land, drink and fly off. A few drops of dish soap break that surface, so flies that touch the liquid sink and drown.

Related Articles

Written by Hannah Whitfield

Hannah Whitfield covers home, lifestyle and entertainment for Fox Bulletin, from kitchen equipment worth the counter space to the record books behind the year's biggest films, albums and shows. Specifications, prices and chart positions get checked before anything is recommended.

View all posts →

Get the Fox Bulletin briefing

The stories that matter, in your inbox. No spam, unsubscribe anytime.

Newsletter signup will be available soon.