Skip to Content

How to Get Rid of Fruit Flies in 2024: A Step-by-Step Guide

How to Get Rid of Fruit Flies in 2024: A Step-by-Step Guide

Wondering how to get rid of fruit flies? If so, you’re not alone.

These pesky insects plague homes all over the country, especially during the summer months. Read on to learn how to get rid of them once and for all.

Our Top Pick
Raid Fruit Fly Trap | 2 Lures & Refills for Indoor Use
Check Price
We may earn a commission when you click this link, at no extra cost to you.

How to Get Rid of Fruit Flies in 8 Steps

Fruit flies can be a nuisance that can be difficult to get rid of. But with the right steps, you’ll have a fly-free household in no time. In a nutshell, these are:

  1. Remove the fruits that are attracting the flies
  2. Clean up any spilled food and drink
  3. Wash your dirty dishes or put them in the dishwasher
  4. Empty your trash can
  5. Use a fly trap
  6. Store ripe fruits in a refrigerator
  7. Vacuum food crumbs from surfaces
  8. Disinfect surfaces

Step 1: Remove the Fruits That Are Attracting the Flies

For a piece on how to get rid of fruit flies, a number of rotten apples sit in a pile

Paul D Smith/Shutterstock

As with anything, the best way to deal with a problem is to address its root cause.

Removing the fruits that are attracting the flies will stop them from coming back. Fruit that’s left in the open on counters and floors attracts fruit flies, especially old and rotten fruits.

It’s best to keep all your fruits and food enclosed when you’re not eating to avoid this problem. When removing food sources, you should target the following:

  • Fruit juice 
  • Fragrant fruits and vegetable peels
  • Fruit that is overripe or rotting

To reduce the number of fruit flies in your home, it’s important to minimize how much food residue you have available for them to feed on.

Step 2: Clean Up Spilled Food or Drink

Once you’ve removed fruits that are attracting the flies, the next step is to clean up the area where fruit flies are hanging out. Spilled food or drink is a sure-fire way to attract them and can be found in many areas of your home.

Potential culprits may include countertops, kitchen floors, and other areas that are often dirty and wet.

When cleaning the surfaces of spilled food, it’s also important to clean any hard-to-reach spaces where fruit flies are most likely congregating.

These may include areas under the sink or in cabinets. Also, remove your stove grates to maximize your cleaning. Once you remove the spills, allow the surfaces to dry naturally or wipe them dry with a piece of cloth.

Step 3: Wash Your Dirty Dishes

Yellow gloves and a sponge wash dirty dishes that are attracting fruit flies


Dirty dishes in your kitchen can be a breeding ground for fruit flies. That’s because the rotten food on these dishes is fodder for these creatures. When cleaning your dishes, it’s important to wash them in hot, soapy water.

Be sure to wash your dirty dishes within an hour or two after eating for the best results. Even when you don’t have time to do the dishes, a quick soapy rinse will help keep the flies away.

Step 4: Empty Your Trash Cans

Trash cans are one of the most common reasons that fruit flies enter any home. With so many foo scrapes, they’re breeding grounds for these pests. 

You’ll know your trash can is attracting fruit flies by simply looking for them around it. If you can smell the contents of the trash can, that’s a telltale sign that the fruit flies will arrive soon.

Try emptying your trash can about once per day and don’t let it stay full too long, or you’ll be creating a conducive breeding ground for the flies.

If your trash is still dirty after emptying, you may need to give it a rinse or a thorough wash. Fill up a dish with soapy water and let it sit out overnight. This will rid it of any fly-attracting odor.

Step 5: Use a Fly Trap

Trap with a lemon and a paper filter showing how to get rid of fruit flies sitting on a wooden table outside


Flytraps are a great way to get rid of fruit flies. Fruit fly traps work by attracting the pesky little bugs with sweet-smelling bait, then trapping them on sticky paper that is coated in some kind of liquid.

Some people make their own homemade fly traps. A popular recipe combines apple cider vinegar and dish soap for a simple trap that drowns flies.

Step 6: Store Ripe Fruits in a Refrigerator

Ripe fruits are the main cause of fruit flies. As such, you’ll need to avoid exposing them.

Refrigerators are the best place to store your fruits, as they’ll kill any eggs or larvae that may already be on them. This reduces the chances of getting a swarm in your home.

Rinse and dry your fruits before putting them in the fridge. While refrigerators are designed to be cool and dry, residue moisture on food can still cause mold and bacterial growth. 

Additionally, be sure to regularly clean the inside surface of your refrigerator with soapy water.

This will kill any eggs or larvae that may have been left in there from previous infestations. You can also use baking soda to get rid of the smell while you clean.

Step 7: Vacuum Food Crumbs from Surfaces

Hand of woman shown vacuuming a pile of crackers next to a wooden piece of furniture to get rid of fruit flies

Miguel G. Saavedra/Shutterstock

Food crumbs are attractive to fruit flies, so it’s important that you remove them from surfaces using a vacuum.

Vacuum up any spilled foods or liquids from counters, tables, and shelves. Cover any surface where you suspect there are crumbs, even if they’re not visible.

As you vacuum up the food crumbs, you might even vacuum up a few flies. Take the bag out of your vacuum cleaner and dump the contents in the garbage can outside.

Another option is to seal the top with plastic wrap to prevent any fruit flies from escaping into other areas of your home.

Remember, some food crumbs may be hard to remove, and the vacuum won’t be effective. If that’s the case, then you need a scrubber. A piece of cloth with soapy water also works well.

Step 8: Disinfect Surfaces

While washing your surfaces with soap and clean water is essential, disinfecting them is just as important.

If you disinfect the surface, it’ll be free of any bacteria or food particles that could cause another fruit fly infestation to occur.

Make sure your surfaces are completely clean and dry before attempting to disinfect them. Wet and damp areas can collect mold spores that may lead to an infestation again in the future.

Some of the best disinfectants you can use to keep away fruit flies include products containing bleach, vinegar, or hydrogen peroxide.

To disinfect your surfaces, pour a disinfectant onto the surface and then scrub it with a sponge. Make sure you cover all parts of the surface.

Let it sit for at least two minutes before wiping it dry with a clean piece of cloth. It’s also wise to let your dishwasher do more than just clean these items.

You can use it as another weapon against fruit flies by adding some bleaching agents to the wash cycle. A bleaching agent helps to kill off any residue on dishes, keeping fruit flies at bay.

Things to Consider

For an image on how to get rid of fruit flies, a bunch of these insects stick to a half-cut lime


While we’ve covered the steps to take to get rid of fruit flies, there are a few things we think you should consider:

  • Apply various methods of fighting fruit flies. You don’t have to limit yourself to a single method; a combination of two or three methods may be more effective.
  • The best way to deal with fruit flies is to target the cause. This means you need to clean up spills, and fruit flies will be less likely to reproduce.
  • Fruit fly traps are a great way of getting rid of fruit flies (or at least trapping them). The most effective trap is the yellow sticky paper with fruit juice on it. 
  • When using a vacuum, make sure there are no leaks on your hose or tube. Any leaks would allow fruit flies to escape from the vacuum machine before trapping them.
  • Consider the type of fruit you store in your home. Fruit flies are attracted to sweet, soft produce, such as bananas and melons.
Our Top Pick
Raid Fruit Fly Trap | 2 Lures & Refills for Indoor Use
Check Price
We may earn a commission when you click this link, at no extra cost to you.

So, How Do You Get Rid of Fruit Flies?

Getting rid of fruit flies is fairly easy once you know the steps to take.

Follow each of the steps above to get rid of fruit flies once and for all.