How to Get Rid of Fruit Flies: 5 Easy Steps That Work (and Stop Them From Coming Back)

how to get rid of fruit flies - close-up of a fruit fly with red eyes

Yardtally is reader-supported. Some links on this page are affiliate links. As an Amazon Associate, Yardtally earns from qualifying purchases. See our Affiliate Disclosure.

If you’re figuring out how to get rid of fruit flies, the fastest fix isn’t the trap. It’s finding where they’re breeding. Fruit flies multiply fast, and a single overripe tomato, a forgotten potato, or a slimy kitchen drain can keep a new batch coming every week. Traps catch the adults, but the flies won’t stop until the source is gone.

This guide covers how to tell fruit flies from other small flies, why they show up in late summer and fall, the 5 steps that get rid of them, how to make a fruit fly trap that actually works, and how to keep them from coming back.

Fruit Flies, Gnats, or Drain Flies?

fruit fly identification - tan body and red eyes

Make sure you’re dealing with fruit flies before you start, because the fix depends on what you have:

  • Fruit flies are tiny, about 1/8 inch long, tan or brownish, with red eyes. They hover around fruit bowls, trash cans, and the kitchen sink.
  • Drain flies, also called moth flies, are fuzzy and look like tiny gray moths. They rest on bathroom walls and breed in the slimy film inside drains.
  • Fungus gnats are small, dark, and skinny with long legs. They hang around houseplants and breed in damp potting soil.

Source: Texas A&M AgriLife Extension — Indoor Flies and Their Control

Why You Have Fruit Flies (and Why Now)

fruit flies swarming on rotting food where they breed

Fruit flies breed in anything that’s fermenting: overripe fruit and vegetables, spilled juice or wine, unrinsed bottles and cans in the recycling bin, the wet bottom of a trash can, and the gunk inside slow drains. Late summer and fall are peak season because that’s when the kitchen is full of ripe produce. If you grow tomatoes, peppers, or squash, every basket you bring in is a potential breeding ground.

They also multiply fast. A female can lay about 500 eggs, the eggs hatch in about a day, and the whole cycle from egg to adult takes as little as 8 to 15 days, depending on how warm the house is. That’s why a few fruit flies can turn into a cloud in about a week. Source: Ohio State University Extension — Vinegar Flies (HYG-2109-97)

How to Get Rid of Fruit Flies in 5 Steps

Step 1: Find and remove the source

This is the step that actually ends the problem. Check the fruit bowl, the counter, the pantry, and the bottom of every produce bin for anything soft, split, or overripe. Look under the fridge and stove for a lost onion or potato, and check the space under the sink. If adult flies keep showing up, the larvae are developing somewhere close by. Source: Iowa State University Extension — Fruit, Vinegar, and Pomace Flies

Step 2: Clean the drains and garbage disposal

If you can’t find any rotting produce, check your drains. The film that builds up inside a slow kitchen or bathroom drain is a common breeding spot. Scrub the inside of the drain with a stiff brush, then flush it with boiling water. For a drain that keeps building up film, a bacterial drain treatment helps break it down over time. Clean the garbage disposal the same way. Source: Iowa State University Extension — Fruit, Vinegar, and Pomace Flies

Step 3: Take out the trash and rinse the recycling

Empty the kitchen trash, then wash out the can itself. A little liquid in the bottom is enough to raise a new batch. Rinse bottles, cans, and jars before they go in the recycling bin, and empty the bin more often until the flies are gone.

Step 4: Set a vinegar trap

Once the source is gone, a trap cleans up the adults that are left. The simple homemade fruit fly trap in the next section catches dozens a day. Set one or two near wherever you see the most flies.

Step 5: Keep it up for two weeks

Because the life cycle is so short, eggs laid before you cleaned up can still hatch over the next week or two. Keep the counters clear, keep the traps out, and empty them every few days for about two weeks. If you’re still seeing new flies after that, there’s a source you haven’t found yet, so go back to Step 1.

For a set-it-and-forget-it option, a plug-in flying insect trap uses light and a sticky pad to catch fruit flies and gnats around the clock. It’s handy near the kitchen sink or fruit bowl while you finish knocking out the population.

How to Make a Fruit Fly Trap

homemade fruit fly trap with apple cider vinegar and plastic wrap

The best fruit fly trap costs almost nothing:

  • Pour about half an inch of apple cider vinegar into a small jar or bowl.
  • Add one or two drops of dish soap and stir gently.
  • Set it where you see the most flies.

The vinegar smells like fermenting fruit and draws the flies in. The soap breaks the surface tension, so when they land, they sink instead of flying off. Red wine, beer, or a little sugar water with yeast work too. If you have a lot of flies, cover the jar with plastic wrap and poke a few small holes in it with a toothpick. The flies find their way in but can’t find their way out. Source: Texas A&M AgriLife Extension — Indoor Flies and Their Control

Use apple cider vinegar, not white vinegar. White vinegar doesn’t smell like fruit, so it doesn’t attract them nearly as well.

How to Keep Fruit Flies From Coming Back

Once they’re gone, a few habits keep them gone:

  • Refrigerate fruit and vegetables once they’re ripe, before they start to ferment
  • Rinse produce when you bring it in from the store or the garden, since eggs can come in on the skin
  • Eat or toss anything that’s getting soft
  • Wipe up spilled juice, wine, and soda right away
  • Rinse recyclables and take out the trash often
  • Run hot water down the drains regularly, and clean any that drain slowly
  • Keep a tight-fitting lid on your kitchen compost bin, and empty it every day or two

Source: Ohio State University Extension — Vinegar Flies (HYG-2109-97)

If you garden, harvest season is when this matters most. Bring in only what you’ll use in the next few days, and keep the rest of your tomatoes and peppers in a cool spot or the fridge. If you compost kitchen scraps, our guide on how to start a compost pile covers how to keep an outdoor pile from drawing flies to the house.

What Doesn’t Work

A few common approaches waste time:

  • Bug spray. It kills the adults you hit and nothing else. As long as the source is there, new flies keep hatching. Extension experts say sprays give temporary relief at best.
  • Traps alone. A trap with no cleanup is a losing battle, because you’ll catch flies forever.
  • White vinegar traps. They don’t attract fruit flies nearly as well as apple cider vinegar.
  • Only cleaning the kitchen. If the source is a drain in the bathroom or a bin in the garage, cleaning the kitchen won’t help. Follow the flies to where they’re coming from.

Source: Iowa State University Extension — Fruit, Vinegar, and Pomace Flies

Frequently Asked Questions About Fruit Flies

Where do fruit flies come from?

They’re attracted by the smell of ripening and fermenting food and get in through windows, doors, and screens. They also ride in on produce, since eggs and larvae can already be on fruit when you bring it home. Once inside, they breed in anything overripe, spilled, or slimy.

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

If you remove the source and set traps, you’ll see a big drop in a few days. Plan on about two weeks to get rid of fruit flies completely, since eggs laid before you cleaned up can still hatch.

Why isn’t my fruit fly trap working?

Usually it’s one of three things: you’re using white vinegar instead of apple cider vinegar, you forgot the drop of dish soap, or there’s a breeding source nearby that’s more attractive than the trap. Move the trap closer to where you see the flies and keep looking for the source.

Are fruit flies harmful?

They don’t bite or sting, but they land on garbage, drains, and rotting food, then on the food you’re about to eat. Throw out any produce they’ve been crawling on that you can’t wash or peel.

Do fruit flies come from drains?

They can. The slimy film inside a slow drain is a common breeding spot. If your fruit flies keep coming back with no rotting produce in sight, scrub and flush your drains. If the flies look fuzzy and moth-like, they’re probably drain flies instead.

Sources & Further Reading