How to Get Rid Of Fruit Flies And Keep Them Away

Last Updated on: January 28th, 2020 at 8:15 pm

Let me start off with a simple question. Which flying insect loves fruit more than you do?

Any Guesses?

Yes, you are right – we are talking about fruit flies.

Fruit flies are known by many names like Vinegar or Pomace flies. The scientific name of a Fruit fly is “drosophila”. In the world of science, they have a special place, as they have been crucial in the study of genetics.

However, inside your kitchen, they are more of an annoying pest than a subject of scientific study.

In this article, we are going to see how to get rid of fruit flies – but before that lets understand how a typical fruit fly looks like.

Fruit flies are small, red-eyed, 1/4 inch long. They are commonly associated with overripe/fermenting fruits or vegetables.

Table Of Contents

Identifying a Fruit Fly


Physical Features

Fruit fly adults are dull yellowish, brownish black or, brownish yellow in color. Their size varies from 1/10 of an inch to 1/4 of an inch. Most of the fruit fly species have red eyes.

They also have transverse black rings across the abdomen as shown in the following image. Fruit flies exhibit sexual dimorphism, which means that males and female fruit flies differ in size and appearance.


Male fruit flies are typically 2.5 millimeters shorter than the females. In addition to this, male fruit flies have darker backs, with a distinct black patch on the abdomen.


Behavior and Habitat

Fruit flies live in a wide range of habitats. Most common habitats include homes, especially kitchens, grocery stores, restaurants, or any other place where food may be present in rotting or fermenting condition.

Fruit flies are mostly attracted to overripe fruits or vegetables. In addition to fruits, they can also breed in drains, garbage cans or soapy mop buckets.

They only need a warm and moist environment with some organic matter to breed and thrive.

Following is a list of common fruit fly breeding sites:

  • Trash cans, especially when the bottoms of the trash cans become wet due to leaking plastic liners.
  • Bags containing vegetables like potatoes or onions.
  • Damaged or overripe fruits like bananas, tomatoes, pineapples etc.
  • Vinegar, Wine or Beer containers with open or loose lids.
  • Damp mops or cleaning rags.
  • Any type of rotting organic matter.
  • Kitchen sinks and floor drains.

Life Cycle of a Fruit Fly


Female fruit flies lay their eggs on the exterior surface of rotting fruits and vegetables. Each female lays around 300 – 500 eggs. These eggs hatch into larvae and the larvae feed on the yeast and fungi growing near the infested area.

When fully grown the larvae are ready to pupate. For pupation, they leave the food and pupate in some dryer area.

The complete development from an egg to adult takes around 8 to 10 days in the summers. As soon as the adult comes out of a pupa it is ready to mate and the cycle repeats within next 24 hours.


  • Causing plant injury: Fruit flies often lay their eggs in the fresh flesh of fruits and vegetables. After the eggs hatch, they begin to consume the fruits or other organic matter near it like plant shoots, flowers etc., hence damaging the plants.
  • Economic Injury: In some countries, high levels of fruit fly population damage the fruits before they are picked from the trees, resulting in a huge wastage.
  • Food Contamination: Fruit flies contaminate the food by bacterial contamination. And ingestion of fruit fly infested food has been reported to cause diarrhea, intestinal upset, or intestinal myiasis.

Recommended Reading: How to get rid of flies indoors

How to Get Rid Of Fruit Flies

The process of getting rid of fruit flies can be divided into two stages:

Stage 1 (Fruit Fly Control Techniques) – Stage 1 primarily comprises of the methods that can be used to control the further growth of fruit flies. Here we try to control the growth of flies by cleaning or rather destroying their breeding sources. This will help to stop any further growth of the flies.

Stage 2 (Fruit Fly Elimination Techniques) – After we have cleaned all the possible breeding sites of the fruit flies, we will be left only with the adult flies. Since they now have no place to lay eggs, so the fruit fly problem will come to an end after the adult flies are killed. And this is the Stage 2 of the process.

Stage 1: Fruit Fly Control Techniques

Once a home or restaurant gets infested with fruit flies, all the probable breeding sites must be located and cleaned. Unless the breeding sites are identified and cleaned, the fly infestation will continue no matter how many insecticidal fogs or sprays are used.

Step 1: Find the Breeding Place

Finding the breeding spot is the most important step in the Stage 1 of the process. Sometimes it can be very challenging and will often require a good amount of thought and determination.

Following is a list of common fruit fly breeding sites:

  • Trash cans, especially when the bottoms of the trash cans become wet due to leaking plastic liners.
  • Bags containing vegetables like potatoes or onions.
  • Damaged or overripe fruits like bananas, tomatoes, pineapples etc.
  • Vinegar, Wine or Beer containers with open or loose lids.
  • Damp mops or cleaning rags.
  • Any type of rotting organic matter.
  • Kitchen sinks and floor drains.


Generally, the breeding sites would have plenty of decaying organic matter with warm and moist climate. To become doubly sure, you can wrap a potential breeding source like a trash can or a kitchen sink with a clear plastic food storage bag and leave it overnight. If flies are breeding in these areas, the adults will emerge and will be caught in the bag.

Step 2: Clean the Breeding Source

After you have found a possible breeding source of fruit flies, clean it up or remove the breeding source if it’s some decaying fruit or vegetable.

For cleaning the breeding source you can use a borax and water solution. After washing the site, try to keep the area clean and dry.

Stage 2: Fruit Fly Elimination Techniques

In stage 2 of the process, we are going to have a look at some methods to kill or trap the adult fruit flies in the infested areas. In this section, we are going to see some quick fire ways to eradicate fruit flies.



Basically, there are 3 major types of fruit fly traps. In this section, I will focus more on the construction part of these traps. And in the next section, I will explain different types of lures/attractants that can be used with these traps.

Soda bottle Trap

This is one of the most common traps that can be easily made with a few basic things. To make this fly trap we need following items:

  • An empty plastic bottle (soda bottle or water bottle)
  • A sharp knife
  • Cellophane Tape
  • Lure

After you have collected all the above-mentioned items, take the knife and cut the plastic bottle as shown in the below image.

Cut the bottle

Next, drill a 5 mm hole in the bottle cap.


After this, put the attractant\lure in the lower part of the bottle and place the upper part upside down as shown.

join the bottle

Finally, apply cellophane tape on the edges of the bottle to seal it tightly.

Paper Cone Trap

This is another simple but effective trap. To make it collect following items:

  • Wide mouth jar
  • Lure
  • Paper cone

First, cut a small hole of around 0.5 cm diameter at the apex of the paper cone.

Paper Cone

Next, take the jar and pour some lure in the jar. Then place the cone in the jar upside down as shown in the below image. Make sure that the cone does not come in direct contact of the lure.

Homemade Fly Trap 1

You can also apply some cellophane tape on the sides of the jar so that it can hold the cone firmly.

Tumbler Trap

This is a simple but very effective home-made fruit fly trap. Below is a list of items that you need to make this trap:

  • A tumbler
  • Lure
  • A thin plastic sheet
  • A rubber band

Take the tumbler and put the lure inside it. Cover it with the thin plastic sheet and fasten a rubber band to prevent the plastic sheet from coming off.

Tumbler with Plastic Cover

Finally, poke some holes into the plastic sheet and the trap is ready.


Now, let’s see different types of lures that can be used with the above traps. Researchers have found that fruit flies use their olfactory system (sense of smell) to find an overripe fruit or vegetable. What they are sensing and smelling, are things like acetic acid, which is present in overripe or rotting fruits.

The lures like apple cider vinegar, wine or tequila contain acetic acid molecules and hence the fruit flies are attracted to them.

Check out this article: What Attracts Flies Into Your Home Or Surroundings?

Apple Cider Vinegar Trap


Apple Cider Vinegar is one of the most popular attractants used in the fruit fly traps. To use it as a lure in fly traps – Mix a cup and a half of apple cider vinegar with 3 – 5 drops of dish soap.

Dish soap breaks the surface tension of the solution and causes the flies to sink as soon as they come in contact with the attractant.

Heating the apple cider vinegar in the microwave for about 10 – 12 seconds before using it makes it more effective. Household vinegar is composed of diluted acetic acid with water. When the vinegar is heated, the water molecules evaporate, thereby increasing the concentration of acetic acid in the mixture. Doing this releases more of the vinegar’s fragrance and hence attracts more fruit flies.

You can use this lure with any of the three traps mentioned in the Traps Section.

Red Wine Trap for Fruit Flies

Wine is another great attractant for fruit flies, especially red wine. To use it as a lure simply take 1/2 cup of wine in any of the above traps along with 2 – 3 drops of dish soap.

Although you can use any type of Wine in the traps, like Red Wine, White Wine, Rosé Wine or Fortified Wine. But Red wine seems to work best when it comes to attracting fruit flies. This is because red wine is considered to be the most aromatic wine.

You can use this lure with any of the three traps mentioned in the Traps Section.

Banana Peel or Rotten Fruit Trap

Fresh or stale banana peels or rotten fruit can also be used as an attractant in fruit fly traps. Though they are not great, but still they do a steady job of trapping pesky flies. To use this lure simply take few banana peels or rotten fruits and use them as a lure in the tumbler trap.

Tequila Trap

Tequila also works great in fruit fly traps. The way it works is very much similar to the wine or vinegar lures.

You could use it with any of the traps mentioned in the Traps Section.

Yeast Trap for Fruit Flies

As we know, fermented food products can attract fruit flies. So, yeast trap can be a great lure to trap fruit flies. To use this lure simply follow the below steps:

  • Take a glass jar and add warm water to it.
  • Next, sprinkle some dry yeast over it.
  • Add a teaspoon of sugar. Adding sugar will make the yeast bait more effective.
  • Finally, stir the mixture and use this as a lure in any of the traps mentioned in the Traps Section.

Note: It is important in such traps to change the lure daily. As it can become a potential breeding site for fruit flies if left for more than 1 day, thereby worsening the situation.

Milk and Ground Pepper Trap

Ground Pepper

Milk and Pepper based lures have been used to attract fruit flies from ancient times. To make this lure take 1 cup milk and add 3 – 4 tablespoons sugar to it. Next, add 1 tablespoon ground pepper to the solution.

Heat the solution for 5 minutes on simmer and its ready to be used as a lure in any of the traps mentioned in the Traps Section.

Banana Bag Trap

The banana bag trap is another nice and frugal way to eliminate fruit flies. To use banana bag traps you would need the following items:

  • An empty bread bag or any other long and thin plastic bag
  • An overripe banana

Cut the overripe banana into slices and put a few slices into the bread bag. Set the trap in an area where you notice the flies. Make sure the plastic bag is opened enough for them to fly in.

Let the trap sit overnight.

In the morning carefully close the open end of the bag and twist it tight. Tie a knot, if required without disturbing the flies inside. While closing the bag, do not let the air out or the flies may get a chance to escape.

Get more details about this trap here.

Recommended Reading: Homemade fly traps

Lemon Grass Spray for Fruit Flies:

Fruit flies hate lemongrass spray. Lemongrass oil won’t kill fruit flies, but it can repel them. To make Lemongrass spray you will need the following items:

  • Lemongrass essential oil
  • A clean spray bottle
  • ½ Cup warm water

To make the spray, take ½ cup warm water and add 20 – 22 drops of lemongrass essential oil to it. Pour the solution in the spray bottle and shake well before use.

Spray it along window sills, around the kitchen sink and near doorways. Besides repelling fruit flies it can keep your home refreshingly aromatic.

Peppermint Oil Spray for Repelling Fruit Flies


Peppermint oil has natural insecticidal properties and hence it is also used to get rid of fruit flies. To make Peppermint spray you will need the following items:

  • Peppermint Oil
  • A Clean spray bottle
  • ½ Cup warm water

To make this spray, put 7 – 10 drops of peppermint oil in a ½ cup of warm water. Transfer the contents to the spray bottle and shake the mixture well before use.

Spray it in the infested areas and you will see the flies getting repelled by its strong scent.

Alcohol Based Spray

Fruit flies die almost instantly as soon as they come in contact with alcohol. To make an alcohol based spray, take a misting spray bottle and fill it with rubbing alcohol (concentration 70%).

Spray it directly over the hovering fruit flies. You will see them dying instantly. The best thing about alcohol based sprays is that alcohol is a disinfectant and is far less dangerous than any commercial pest sprays.

Using Rue as a Repellent

Rue is an herb that has insecticidal properties and it is believed to repel fruit flies. Dried and crushed rue repels some types of insects, including fruit flies. You can keep some of this natural deterrent near your fruit bowl to keep the pests away.

Although no scientific proof exists that a bouquet of fresh rue or died crushed rue repels fruit flies, but some people swear by it.

Note: Be very careful when trying out Rue – some people are allergic to it.

Vanilla based Fruit Fly Repellent


To make this repellent, get following items:

  • Shallow Jar with a lid
  • 2 Cotton balls
  • 10 – 15 fresh mint or sage leaves
  • Vanilla extract (about 4 tablespoons)
  • Cheese Cloth

First, take the shallow jar and place the two cotton balls at the bottom. Add about 4 tablespoons of Vanilla extract to the jar. Then place 10 – 15 fresh mint and sage leaves over the cotton balls. Make a few holes in the lid of the jar and finally seal the jar with cheesecloth by screwing the lid over it.

You can keep this jar near the infested area and see the flies getting repelled by its aromatic scent. The jar can be used for almost a week, so make sure to replace the contents each week.

For more details check out this website.

Using Basil as a Repellent

Fruit flies don’t like Basil, especially Lemon basil or Cinnamon basil. Keep a small pot with basil planted in your kitchen near the fruit bowl.

If this is not possible, you can also try sprinkling some basil leaves on your fruit to keep fruit flies away.

Using Lavender as a Repellent


Lavender is an incredibly useful plant, lavender smells wonderful to us, but – to the fruit flies, lavender scent is repulsive. You could try growing some fresh lavender on your kitchen windowsills.

If that is not possible then you could use a lavender oil soaked sponge near your fruit bowls to keep flies away from it.

Fly Paper

Fly paper or fly ribbon is a great cost effective way to trap flies. A fly paper is generally coated with a sweet fragrant or an attractant to which flies get attracted.


The paper is extremely sticky and sometimes also has a layer of poisonous insecticide over it. This attracts flies to a fly paper and as soon as they try to land on it they get stuck.

Although these days in the market, you can find hundreds of brands offering fly papers, but still you can make a homemade fly paper easily. To make a fly paper at home, you would need the following items:

  • Sheets of brown paper or thin cards
  • Scissors
  • Heating Pan
  • A large sized spoon for stirring
  • Corn Syrup
  • Water
  • Thread

First, cut the brown paper into sheets, at least 2 inches wide. Next, take equal parts of water and corn syrup in a pan. Heat the mixture till it starts boiling, keep stirring the mixture with a spoon while heating. After this, turn off the heat and soak the paper strips in the mixture for 4 – 5 hours.

After the paper strips have been soaked for 4 – 5 hours, take them out and let them dry for 2 – 3 hours. Once dry, your home made fly strips are ready to be hanged in the fly infested areas.

Read this: All about fly papers

Use Cedar Wood as a Repellent

Fruit flies are repelled by the aroma of cedar wood. You can keep some cedar wood in your home, like a decoration item near the fruit fly infested area. And soon you will begin to notice a decrease in the fruit fly population.

Pyrethrin Based Insecticide Sprays

Pyrethrin is a natural insecticide that exists as organic compounds in nature. Pyrethrin kills the insects by targeting their nervous system. Pyrethrin occurs naturally in the Chrysanthemum flowers.

Pyrethrins Based Insecticides For Flies

And because of this, it is considered to be a safe insecticide. Pyrethrin sprays like CB 80 Pyrethrin Aerosol or PT 565 can kill a whole swarm of fruit flies in a second.

You can get the concentrated pyrethrin based insecticide from any farm supply or agricultural chemical firms.

Note: Please note that even though Pyrethrin is a naturally occurring insecticide, but still it is toxic. Use it with due caution.

Vacuuming Fruit Flies

Yes, it may sound like a simple tip, but vacuuming fruit flies can be a great method to eliminate them.

This is my favorite method as it is simple and doesn’t force you to deal with chemicals or mess. For this task, I have Black Decker BDH2020FL which is lightweight, portable and gives the adequate suction power.

The method is really simple, you just have to switch on your vacuum cleaner and point the nozzle towards these pesky monsters.

You can check out the Black Decker BDH2020FL here.

Using Electronic Fly Zapper

An electric fly zapper is also known as electrical discharge insect control system.

The device lures the insects towards itself by its super bright light and zaps it as soon as the insect comes in contact with it.

Electronic fly zappers generally emit a milky white light to which most flying insects get attracted. Near the light source is an electric grid, when a fly comes near the electrodes, it gets an electric shock and is killed.

The killed insects are collected in a collection tray, this makes it easy to dispose the dead insects. The device also has a protective guard that prevents people and pets from accidentally touching the grid. Electronic fly zappers are mostly designed for indoor use only.

Check out this Electronic Fruit Fly Zapper at Amazon.

Cleaning the Drains

Apart from breeding in overripe vegetables or fruits, fruit flies can also breed and thrive in drains, feeding on the organic matter present in the drains.

cleaning the drains

To kill the fruit flies that breed in drains, you can use the following method:

  • Take 1 liter boiling water and add ½ liter white vinegar to it.
  • Pour the mixture down the drain daily for 2 – 3 days.
  • Check if the fruit fly problem is controlled or not. This works in almost 70 – 80% cases of fruit fly infestation.

If this doesn’t work, then you may need to clean the drains using a drain cleaning gel and a plumbing snake. Follow the below procedure:

  • First, moisten the drain with 2 – 4 liters of water. After this use a metal pipe brush or a plumbing snake to pull out the grime. Move the brush in an up and down motion to clean the sides of the pipe.
  • Next, pour a drain cleaner gel into the pipe trying to coat the sides of the pipe. Drain cleaner gel is specifically formulated to remove the organic matter from the drains.
  • After a few hours of application of the drain cleaner gel, pour plenty of water. You could also use a plunger to flush any remaining organic matter trapped in the pipe.

Using IGR’s

IGR is an abbreviation used for insect growth regulators. Insect growth regulators are one of the best biological methods to end a fruit fly infestation.

IGR’s are chemically synthesized hormones that interfere with the normal life cycle of an insect. During the life cycle of an insect, it undergoes a process called molting. In the molting process, the insect grows a new exoskeleton under its existing one, and then it sheds the existing exoskeleton to grow further.

Insect growth regulators prevent the insect from reaching the maturity by interfering with the molting process. This makes it impossible for the insect to reach the adult phase of the life cycle and hence it cannot reproduce.

IGR’s are mostly beneficial against drain flies and fruit flies. For fruit flies, you could use Gentrol Aerosol. To use this, spray this aerosol near the possible breeding sources of the fruit flies like trash cans, floor mats, into drains etc.

You can buy Gentrol Aerosol from Amazon

Comparison of Commercially Available Products

Product ImageProduct Name
EfficiencySpeed Of RemovalCost
Electric Fruit Fly Zapper
Check at Amazon
Electric Fruit Fly Zapperstarstarstarstarstarstarstar$
Aunt Fannie's FlyPunch
Check at Amazon
Aunt Fannie's FlyPunch!starstarstarstarstarstar$
BEAPCO Fruit Fly Trap
Check at Amazon
BEAPCO Fruit Fly Trap
Bye Bye Fruit Fly Lure
Check at Amazon
Bye Bye Fruit Fly Lurestarstarstarstarstarstar$$
TERRO Fruit Fly Trap
Check at Amazon
TERRO Fruit Fly Trap
Gentrol Insect Growth Regulator
Check at Amazon
Gentrol Insect Growth Regulator
RESCUE Fruit Fly Trap
Check at Amazon
RESCUE Fruit Fly Trap
Fruit Fly BarPro Strips
Check at Amazon
Fruit Fly BarPro Strips
Eco Defence Natural Non Toxic Fruit Fly Lure
Check at Amazon
Eco Defence Natural Non Toxic Fruit Fly Lure 

Note: In the “Cost” column ‘$’ means single digit price [$1 to $9], while ‘$$’ means double digit price [$10 to $99].

[Disclosure:  Please note that some of the links in the above table are affiliate links. This means that and at no extra price to you, I will receive a small commission if you choose to make a purchase.  Please understand that I have used most of these products myself, and I recommend them because they are helpful, and not because of the small commissions I may make. Please do not buy any products from the above list that you feel won’t be of any use to you.]

How to Prevent Fruit Flies

It is said prevention is better than cure. So, here are a few tips that can help you to prevent a fruit fly invasion in your home:

  • Wash the fruits and vegetables thoroughly with water before storing them. As there is a high chance that it might have fruit fly eggs on it.
  • Cover your garbage cans and dispose of the garbage at least thrice a week.
  • Slow down the ripening of fruit and vegetables by keeping them refrigerated.
  • Ensure that sinks and garbage disposals are clean from pieces of food.
  • Clean the sponge that you use for washing dishes, preferably with soap and water. Rinse well and dry. Do not leave it wet in the sink.

So, this was all about how to get rid of fruit flies. We would love to hear if you have some other methods, stories or ideas related to the topic.

Good luck, soldier! 🙂

About Ankit Zadi

My name is Ankit Zadi, and I can call myself a 'Fly Expert'. My adventures with flies began when we shifted to our new house seven years back. My goal on this website is to share everything that I know about flies. Check out my full story here.