Pocket worthyStories to fuel your mind

How to Get Rid of Fruit Flies — and Stop Them Before They Appear

Fruit flies are a common kitchen pest. Here’s how you can prevent and eliminate them.

The Washington Post

Read when you’ve got time to spare.

Animated GIF of a man swatting away fruit flies with an oversized flyswatter

(Ronan Lynam/For The Washington Post)

If you have a kitchen, you will have fruit flies at some point. It’s as simple as that.

“They are everywhere,” says Theresa Dellinger of Virginia Tech’s Insect Identification Laboratory. If you end up with some in the kitchen, don’t feel ashamed. They’re just a part of nature in your kitchen. “Everyone gets them,” she says.

Here’s what you need to know about these ubiquitous insects, including where they come from, how to prevent them and how to eliminate them once they show up.

What are fruit flies?

The scientific name for what we see in the kitchen is Drosophila melanogaster, or “black-bellied dew lover” — “probably one of the more poetic names out there,” Dellinger says. They’re small and winged, with characteristic red eyes.

Where do they come from?

Fruit flies can get in your house the same way any other insect can, through doors or windows especially, says Zachary DeVries, assistant professor at the University of Kentucky’s Department of Entomology. Fruit flies are largely seasonal, except in spots that are quite warm year-round, coming out the most in spring and summer. They overwinter outside underground, not in your house, unless it’s warm and they have a constant source of food, DeVries says.

animated GIF of fruit flies buzzing around some blueberries
(Ronan Lynam/For The Washington Post)

Why do we get them?

Fruit flies are attracted to rotting, fermenting produce (that’s why they are also referred to as vinegar flies). They are attracted to the fermenting odors associated with home-brewing or sourdough as well, Dellinger says. They are not, however, associated with house plants, unlike some other insects.

Fruit flies “don’t need a whole lot” to flourish, according to DeVries. A single potato, for example, can support 500 fruit flies, if not more, he says. One of the reasons you see them more in warmer weather is that we tend to buy a lot of produce in summer, including tomatoes, peaches and melons, that we leave out on the counter, and even forget when we go on vacation. The fruit flies are then attracted to the food, where they lay their eggs, and the circle of life continues.

It needn’t be a piece of produce to cause a problem, though. Any place where there’s debris or a neglected spill — the bottom of the trash can, the sink drain, under the refrigerator or even inside a wine bottle that hasn’t been rinsed well for recycling — can attract fruit flies, Dellinger says.

How can I get rid of them?

The entire life cycle of a fruit fly is completed in a week or two, DeVries says, so “you don’t have to wait very long for the entire population to come crashing down.”

First thing’s first: There’s no need to pull out the insecticide, DeVries says. That’s something you want to avoid in the kitchen, where you are preparing food. It’s also totally unnecessary and won’t solve the problem in the long term. If you want to eliminate the bugs you see flying, DeVries recommends an old-fashioned fly swatter or a vacuum cleaner, which you can empty outside.

You can also trap them. Dellinger says there are commercial traps out there, but you can make one with materials you likely have on hand. Fill a small jar or container with half an inch of fruit juice, vinegar, apple cider or wine, and add a couple of drops of dishwashing detergent. Cover with plastic wrap and then punch a few holes in the wrap. The flies will be attracted by the bait, but won’t be able to escape because the soap breaks the surface tension of the water, trapping the flies. Another model involves a similar strategy of a bait and soap, but you construct it by cutting a bottle (soda, water, etc.) in half and then inverting the top half and setting it into the bottom to create a funnel, DeVries says.

But these steps only eliminate the adults. “If you don’t find the breeding source, you’re going to have the same problem in a few days,” DeVries says. So you need to find what’s attracting them and clean it up. And make sure you eat or refrigerate your ripe produce before it starts to go off.

Are they dangerous?

In a word, no. In theory, DeVries says, a fruit fly could carry bacteria from a dirty spot such as your trash can or sink and convey it to a food you end up eating, but this is pretty improbable. Even if you inadvertently ate them at any point in their life cycle, you would likely come to no harm. They’re a pest, yes, just not a dangerous one.

What if vinegar or soap traps don’t work?

Dellinger says another common insect, phorids, can easily be confused with fruit flies. Phorids are about the same size and color but behave differently. Instead of flying, they will run an inch or two, stop and then dart off in another direction, Dellinger says, which is why they’re sometimes called scuttle flies. Like fruit flies, they can be attracted to decaying organic matter, though the same kind of bait traps won’t work. The key is to locate and clean their breeding sites, Dellinger says. Sticky tape can help eliminate the adults.

Becky Krystal is a staff writer and recipe developer for Voraciously. After several years as a general assignment reporter in Virginia’s Shenandoah Valley, she came to The Washington Post in 2007 to work for TV Week and Sunday Source. Her time at The Post also includes a five-year stint in the Travel section.

How was it? Save stories you love and never lose them.


Logo for The Washington Post

This post originally appeared on The Washington Post and was published May 16, 2022. This article is republished here with permission.

Read The Washington Post’s Daily Briefing

Get The Post Most