Locations:
Search IconSearch
October 30, 2024/Living Healthy/Primary Care

How To Get Rid of Fruit Flies for Good

Make your home a no-fly zone by cleaning your drains, refrigerating your produce and DIYing a fruit fly trap

Close-up of a fruit fly

No matter how neat and clean you are, fruit flies can make their way into your home. Once they’re inside, these uninvited guests can hang around and rapidly multiply — sort of like a teenager’s dirty dishes.

Advertisement

Cleveland Clinic is a non-profit academic medical center. Advertising on our site helps support our mission. We do not endorse non-Cleveland Clinic products or services. Policy

In fact, those dirty dishes are like a fruit fly’s welcome mat.

“Fruit flies are attracted to fermenting sugars found in all types of foods and drinks,” says family medicine physician Fred Jorgensen, MD.

The scientific name for fruit flies is Drosophila melanogaster. Drosophila is Latin for dew, which reflects the tiny flies’ fondness for moist foods and humid climates. You may also hear people call them vinegar flies or wine flies.

While fruit flies love moist, overripe fruits and vegetables, they aren’t picky. They’ll eagerly feast on any food matter, including residue inside trash cans, recycling bins, sink drains and garbage disposals. And unfortunately, they’re very hard to get rid of.

Dr. Jorgensen explains where fruit flies come from and, perhaps more importantly, how to make them go.

Where do fruit flies come from?

There are several ways that fruit flies make their way into your home. Invisible to the naked eye, fruit fly eggs may already be lurking on the produce you bring home from the grocery store or farmers’ market. Produce from your garden can also have eggs.

Though these eggs are too tiny to see, there are a lot of them: A female fruit fly lays as many as 500 eggs at once! After the eggs mature (a process that takes about a week), you may find yourself swatting at hundreds of fruit flies … because while the flies are busy dodging and surviving, they’re also seeking out mates and the perfect place to lay even more eggs.

Advertisement

With the right temperatures and food sources, a fruit fly’s life span can last 40 to 50 days. During this time, a female fruit fly can lay hundreds of eggs multiple times.

Even if your food doesn’t initially have fruit flies or eggs, the pests are tiny enough (about 1/8 inch) to slip through small openings. Any sweet food substance left at room temperature can attract them.

Are fruit flies harmful?

Not really. You may turn a little green at the thought of eating or drinking something that has fruit fly eggs (or actual fruit flies) on it, but you’re unlikely to get physically sick.

“Fruit flies are a nuisance but not really a health threat,” Dr. Jorgensen reassures.

One study found that fruit flies can carry bacteria like E. coli, Salmonella and Listeria from one food source to another, but researchers have yet to prove that this transmission increases your chances of getting a foodborne illness.

As Dr. Jorgensen notes, germs lurk everywhere in your kitchen. But you have a natural defender.

“Your immune system does a great job protecting you against bacteria, including the tiny amounts of bacteria that fruit flies might expose you to,” he says.

5 ways to get rid of fruit flies

Even though fruit flies aren’t dangerous, most of us would prefer to eat insect-free foods in our no-fly homes. Dr. Jorgensen shares five steps for keeping fruit flies out of your home in the first place, along with what to do if the pesky insects start dining in your kitchen.

1. Keep a clean kitchen

Clean up any food spills and crumbs quickly, and rinse dishcloths, sponges and mops well. “Any residual food or liquid left on these cleaning tools will attract fruit flies,” Dr. Jorgensen says.

When cleaning the kitchen, don’t forget the sink drain and garbage disposal. “Food residue inside drains and disposals is a fruit fly magnet,” he warns. But pouring warm, soapy water or hot water down the drain or disposal can help.

2. Promptly put away produce

Because produce is a fruit fly’s favorite meal, you can prevent an infestation by taking these steps:

  • Rinse and dry fruits and vegetables as soon as you bring them into your home.
  • Store produce in the refrigerator. Fruit fly eggs are less likely to hatch in cool temperatures below 75 degrees Fahrenheit (24 degrees Celsius).
  • Place nonrefrigerated produce in sealed plastic bags or containers. You can also refrigerate the produce for 24 hours to help kill any eggs. Then, move the bagged or enclosed produce onto the kitchen counter.

3. Freeze your peels

If you compost food scraps or don’t use a garbage disposal, Dr. Jorgensen recommends storing produce peels and other food matter in an enclosed plastic bag in the freezer.

“The cold temperatures will keep eggs from hatching and kill them,” he says. “Then, you can toss the bag on trash day or safely empty the contents into your compost.”

Advertisement

4. Be savvy about trash, recycling and compost

Fruit flies and other pests are attracted to the residue inside cans, bottles and other food containers, as well as the film that coats trash, compost and recycling bins.

You can keep them away with these steps:

  • Rinse all empty food containers before you throw them out.
  • Regularly clean trash, compost and recycling bins with warm, soapy water.
  • Wipe down bins in between each cleaning.
  • Keep recycling bins in the garage or out of the home.

5. Use fruit fly traps

Though you can purchase fruit fly traps online or at your local home improvement store, you can also follow these steps to make a do-it-yourself fruit fly trap:

  1. Fill a small bowl or jar with 1/2 inch of apple cider vinegar.
  2. Squeeze a drop or two of dish soap into the vinegar.
  3. Cover the container with plastic wrap, secured with a rubber band.
  4. Use a fork to poke several small holes into the plastic wrap.
  5. Place the container someplace where fruit flies are active, like on your kitchen counter or near trash cans.
  6. Empty and replace the container when it fills with flies.

The sweet scent of the apple cider vinegar attracts fruit flies, which then enter the trap and get stuck in the soapy solution.

You can also make a similar trap using overripe fruit instead of vinegar and dish soap. The flies land on the fruit and can’t escape through the plastic wrap.

Advertisement

Living in a no-fly zone

Because fruit flies reproduce rapidly, it can take weeks to get rid of them. And sometimes, it’s impossible to get rid of them completely.

“If you live in a housing complex with shared drains, you may still have fruit flies if other residents don’t address the problem,” Dr. Jorgensen points out.

While you can — and should — take steps to minimize fruit flies in your home, just remember: “Fruit flies aren’t an indication of cleanliness. Even the very best grocery stores and restaurants can have them.”

Advertisement

Learn more about our editorial process.

Related Articles

Containers of medications with black box warning labels
January 17, 2025/Primary Care
What Is a ‘Boxed Warning’ on Medications?

‘Black box warnings’ on medications outline potential risks and important instructions

Assorted bottles of Rx medications with pills and capsules around
January 13, 2025/Primary Care
What Is a Generic Medication?

These similar versions of brand-name drugs are safe, effective and often less expensive

Open palm holding a white round pill and a white oblong tablet
January 10, 2025/Primary Care
Acetaminophen vs. Ibuprofen: What’s the Difference?

Though these painkillers work in different ways, they can both help reduce a fever and pain

Empty glass on blue table
January 7, 2025/Brain & Nervous System
Can the Glass Test Indicate Meningitis?

Pressing a glass on a rash provides some clues, but it’s not foolproof

Person frowning, with hand held up to their ear
December 31, 2024/Ear, Nose & Throat
Here’s How To Get Water Out of Your Ear Safely

Turning your head to the side and pulling your ear up and back is one common tactic for relief

Person sitting in cold water tub outside in snowy landscape
December 24, 2024/Orthopaedics
The Benefits and Risks of Cold Plunges

If you don’t have an underlying condition, cold plunges might help ease sore muscles, decrease inflammation and even heighten your focus

Person lying in bed on their side at night with their eyes open
December 17, 2024/Primary Care
Prednisone Side Effects and How To Feel Better When Taking Steroids

Like any medication, prednisone can come with side effects — for best results, take it with food in the morning and work with your provider to get the dosage right

Healthcare provider applying a bandage on arm of person after injecting a shot
December 16, 2024/Primary Care
Recommended Vaccines for Adults and Seniors

From influenza and COVID-19 to pneumococcal, shingles and more, vaccines help keep you healthy

Trending Topics

Person in bed sleeping on their side, covers off
Breathing Problems? Try These Sleep Positions

If you’re feeling short of breath, sleep can be tough — propping yourself up or sleeping on your side may help

A couple looking at skyline, with one person slightly behind the other, head bent down
What Is Anxious Attachment Style — and Do You Have It?

If you fear the unknown or find yourself needing reassurance often, you may identify with this attachment style

Glasses and bottle of yellow-colored prebiotic soda, with mint, lemon and ginger garnish
Are Prebiotic Sodas Good for You?

If you’re looking to boost your gut health, it’s better to get fiber from whole foods

Ad