Pest Resources

How to get rid of Fruit Flies


Fruit flies are small flying insects that are relentless in their efforts to annoy you and lay eggs on your leftovers.

But how do you get rid of them?

We’ve created an in-depth guide on just that. Keep reading to learn how to get rid of the common fruit fly.


In this pest guide you’ll learn about

  • What causes fruit flies?
  • How do I get rid of fruit flies in my house?
  • How does vinegar get rid of fruit flies?
  • How do you prevent fruit flies?
  • Are fruit flies dangerous?

Nearly all homes encounter issues with fruit flies, which are both common indoors and out.

A Fruit fly infestation is most common during summertime when they are active outdoors. However, indoor infestations are possible during all weather conditions.

Did you know? There are over 170 different types of fruit flies in the United States and Canada.

What makes fruit flies appear?

Once you understand what makes fruit flies suddenly appear and what things attract them, you’ll have a better insight of how to prevent them.

The common fruit fly has a similar craving to that of most humans: they crave fruit and vegetables. If you’ve ever taken a bite out of an apple and left it on the side, a fruit fly will be close by to take advantage of your seconds.

Fruit flies are attracted by your trash

 Fruit flies look at your trash like a plate of food. They can smell the rotting fruit and vegetables inside it. This is why it’s important to regularly take out your trash and clean the inside of the bin with bleach.

Fruit flies are particularly attracted to compost bins, as they are full of rotting fruit and vegetables. It’s recommended to keep these bins as far away from your home as possible.

Especially during the summer, you could try to separate your trash by placing all your organic items into a plastic container with a lid. This will create an air tight seal to help prevent fruit flies being able to feast and lay eggs.

Fruit flies are attracted by old stains and spills


If you’ve ever split some soda on your countertop and thought “I’ll clean it later” this is the type of activity that a fruit fly will be attracted to. They have a very good sense of smell, and these pesky fruit flies will focus on that area.

One of the best ways to prevent fruit flies from invading your home is to do a deep clean of your house regularly, paying close attention to the kitchen and countertop areas.

It’s not always obvious to see old spills and stains, especially if the liquid was clear or the same colour as the surface. This works the same way for any mess that wasn’t cleaned up properly.

How to get rid of Fruit flies?

 Female fruit flies are capable of laying up to 500 eggs. During the summer, the process from egg to adult can take as little as 10 days. Therefore, the best prevention for a fruit fly infestation is to eliminate fly breeding sites.

These may involve:

  • Taking out the trash
  • Removing overripe fruit
  • Disposing of rotting vegetables
  • Regularly cleaning surfaces
  • Ensuring bottles and jars are not leaking

The optimal strategy would include using a fruit flies trap combined with eliminating potential breeding sites.

There are several different traps you could use to get rid of fruit flies. We’ve listed a few ways below to help deal with this pest.

  • Apple Cider Vinegar
    Pour boiling apple cider vinegar into moist hiding areas such as shower drains, sink drains, garbage areas, and toilets. (Also use boiling water)
  • Get a drinking glass, pour 2″ of vinegar (apple cider vinegar, white vinegar, or balsamic) into the glass and mix with a tiny amount of dish soap.

The dish soap will act as a glue, in order to prevent fruit flies from leaving the vinegar and causing them to drown. It’s a good idea to cover the glass with a piece of plastic wrap then poke several holes to allow the smell of the vinegar to seep into the air.

Fruit flies will smell the apple cider vinegar and may fly into the holes seeking their next meal and get stuck in the liquid.

Use a bowl of soapy water – Fill a bowl up with a mixture of water and a few drops of dish soap, then mix them to form a bubbly and foamy liquid. Place the bowl under a light or lamp during the night. The dish soap essentially decreases the surface tension.

The reflection of the light may attract the fruit flies, they’ll land or fly into the bowl, and not be able to leave.

Fruits in a jar – Get a jam jar or mason jar and poke a few holes in the top using a screwdriver. Other recommended containers are peanut butter jars, coffee canisters etc. Take some organic trash such as apple cores or banana peels and place them inside the jar.

Similar to the vinegar concept, the average fruit fly won’t be able to resist the smell and may fly right into the holes. The chance of them being able to fly out again is dramatically reduced, as there won’t be a sweet smell coming from the outside air. Fruit fly traps are a great method, and the best part is most of them are homemade.

Weird methods to get rid of fruit flies

 Basil Leaves

Keep a basil plant near your fruit and vegetables. Many chefs have noted that this method has had good results for repelling the common fruit fly. It would seem that fruit flies aren’t too fond of the basil smell! A more natural method to get rid of fruit flies.

Keeping Fruit Flies Away


Keeping a clean environment

 Remember, fruit flies will dine on anything they can, not just fruit and vegetables. This extensive list includes crumbs, spills, stains etc. So the trick is to reduce these types of attractions as much as possible.

Clean those surfaces after you’ve cooked your dinner, empty any leftovers from the sink, and throw in the trash. The cleaner the environment, the less likely you’ll have any fruit flies buzzing around.

Cover food


 If you have any leftovers, make sure they are covered by using some plastic wrap and foils, or using upturned bowls.

Throw away food if it’s going off

 Keep an eye on how fresh your food, is especially if it’s fruit and vegetables. If it’s slowly going brown, it’s best to throw it away!

Dry up moist areas

 Make sure your kitchen tops and bathroom areas are dry after you clean, focusing on any damp areas. Fruit flies are often found near damp areas, so make sure you keep them as dry as you can.

Thoroughly wash your produce

Fruit flies will often catch a ride into your home on the back of produce such as apples, bananas, broccoli, strawberries and more. Make sure you wash the produce as soon as you arrive home from the store. This will not only remove any trace of a fruit fly, but it’ll also remove their eggs, which aren’t visible to the human eye.

Are Fruit Flies dangerous?

 Fruit flies are not capable of biting, even so they are a nuisance. They are a public health hazard in hospitals, as they can contaminate sterile surfaces. Fruit flies may cause bacterial contamination. It has also been reported that ingestion of contaminated food leads to diarrhea.
 Continue reading about Fruit Flies 

So now you’ve learnt what causes fruit flies and how to get rid of them. Did you want to learn how to make your own homemade fruit fly trap? If so, click here.



Ronald has 25 years of pest control experience under his belt. He scrutinizes each control method, product and process to prevent infestations effectively. 

Read more here.

Most Popular Articles