How to get rid of fruit flies in the kitchen? There’s nothing quite like the frustration of spotting those tiny, persistent fruit flies buzzing around your kitchen. One moment, your space is clean, and the next, these minuscule invaders seem to appear out of nowhere, circling your fruit bowl and darting away when you try to swat them.
If you’re currently waging war against these pesky insects, you’re not alone – fruit fly infestations are one of the most common household nuisances, especially during warmer months. The good news? With the right approach, you can eliminate these unwelcome guests. In this article, we will explore 16 effective strategies to permanently get rid of fruit flies in the kitchen and prevent them from returning.

What are Fruit Flies?
Fruit flies (Drosophila melanogaster) are tiny insects measuring about 1/8 inch in length with red eyes and tan or brownish bodies. Despite their name, they’re attracted to more than just fruit – any fermenting organic material can draw them in.
What makes fruit flies particularly challenging is their remarkable reproductive capacity. A female fruit fly can lay up to 500 eggs at a time, and these eggs hatch within 24-30 hours.
The resulting larvae feed on the decaying matter for about 5-6 days before pupating. Just 10-12 days after the egg is laid, a new adult fruit fly emerges, ready to continue the cycle. This rapid reproduction means that a small problem can quickly escalate into a full-blown infestation.
Fruit flies typically enter our homes on fruits and vegetables purchased from the store, but they can also fly in through open windows or doors, particularly if there’s something attractive nearby. Once inside, they gravitate toward moist, fermenting food sources – overripe fruits, vegetables, spilled juice, wine, beer, and even moist mops or cleaning rags.
Why Fruit Flies Love Your Kitchen
Fruit flies are attracted to your kitchen for several compelling reasons:
- Ripening Fruits and Vegetables: As their name suggests, fruit flies are particularly drawn to ripening or fermenting fruits and vegetables. The yeast from fermentation produces odors that are irresistible to these insects.
- Moist Areas: Fruit flies thrive in moisture-rich environments, making your kitchen sink, drain, garbage disposal, and wet mop heads perfect breeding grounds.
- Garbage and Recycling: Food waste in trash cans and empty bottles or cans in recycling bins provide ideal habitats.
- Warm Temperatures: These pests prefer temperatures between 70°F and 80°F – exactly the range many of us keep our homes.

16 Easy Ways to Get Rid of Fruit Flies in the Kitchen
1. Apple Cider Vinegar Trap
Perhaps the most popular and effective DIY solution is the apple cider vinegar trap. Fruit flies are irresistibly attracted to the fermented smell of apple cider vinegar, making this an excellent bait.
What You’ll Need:
- Apple cider vinegar (about 1/4 cup)
- A small bowl or jar
- Plastic wrap
- Toothpick or fork
- Optional: a drop of dish soap
How to Make It:
- Pour the apple cider vinegar into your container, filling it about halfway.
- Add a drop of dish soap to break the surface tension (this ensures flies that land in the liquid will sink rather than float).
- Cover the container tightly with plastic wrap.
- Use a toothpick or fork to poke several small holes in the plastic wrap.
The fruit flies will be attracted to the vinegar smell, enter through the holes, and become trapped inside, unable to navigate back out through the small openings. Place several of these traps around your kitchen, particularly near areas where you’ve noticed fruit fly activity.

2. Red Wine Trap
If you have a bottle of red wine that’s past its prime, put it to good use as fruit fly bait.
What you’ll need:
- A small amount of red wine (even the dregs from a bottle will work)
- A small container
- Plastic wrap
- Toothpick
- Optional: dish soap
How to make it:
- Pour a small amount of red wine (about 1/4 cup) into your container
- Add a drop of dish soap if desired
- Cover with plastic wrap and poke small holes
- Place near problem areas
Wine’s fermented aroma is practically irresistible to fruit flies. This method works similarly to the apple cider vinegar trap but can sometimes be even more effective due to the wine’s strong fragrance and sugar content.
3. Fruit Trap
Use the very thing attracting flies to capture them.
What you’ll need:
- A piece of very ripe or slightly rotting fruit (banana peels work exceptionally well)
- A jar or container
- A paper cone or funnel
- Tape
How to make it:
- Place the fruit at the bottom of the jar
- Make a paper funnel with a small hole at the narrow end
- Place the funnel in the jar with the narrow end pointing down
- Tape the funnel in place if needed
- Set the trap in problem areas
Flies will enter through the wide end of the funnel, attracted by the fruit, but will have difficulty finding their way back out through the small hole. This method capitalizes on fruit flies’ natural attraction to overripe produce.
4. Dish Soap and Vinegar Spray
For a more aggressive approach, when you can see flies gathering.
What you’ll need:
- 1 part vinegar (any type)
- 1 part water
- Several drops of dish soap
- Spray bottle
How to make it:
- Mix equal parts vinegar and water in the spray bottle
- Add several drops of dish soap and shake gently to mix
- Spray directly at clusters of fruit flies
The soap in this mixture weighs down the flies’ wings so they can’t escape. This method works best for immediate results when you can see groups of flies, though it’s not as effective for ongoing control as traps.

5. Essential Oil Repellent
Create a natural repellent that smells pleasant to humans but drives fruit flies away.
What you’ll need:
- A small spray bottle
- Water
- 10-15 drops of essential oils (lemongrass, eucalyptus, lavender, or peppermint work well)
- Optional: 1 tablespoon of vodka or rubbing alcohol (helps the oils disperse in water)
How to make it:
- Fill the spray bottle mostly full with water
- Add the essential oils and alcohol if using
- Shake well before each use
- Spray around fruit bowls, trash cans, and other problem areas
Essential oils contain compounds that fruit flies find repellent. While not a solution for eliminating existing infestations, this spray helps deter new flies from settling in your kitchen. I especially like using lemongrass oil, which has a pleasant citrusy scent but seems particularly effective at keeping fruit flies at bay.
6. Drain Cleaner Method
Fruit fly larvae often develop in the organic matter built up in drains.
What you’ll need:
- Boiling water
- 1/2 cup salt
- 1/2 cup baking soda
- 1 cup white vinegar
How to do it:
- Pour boiling water down the drain
- Follow with salt and baking soda
- Finally, pour in the vinegar
- Let it sit for at least an hour (overnight is better)
- Flush with more boiling water
This method creates a foaming reaction that helps dislodge the organic matter where fruit flies breed. For persistent drain problems, repeat this treatment several times over a few days.

7. Sticky Fly Tape
Sometimes the old-fashioned methods work best.
What you’ll need:
- Commercial fly tape or ribbon
- Alternatively: make your own with yellow paper and honey
How to use it:
- Hang commercial fly tape near problem areas
- Or, cut strips of yellow paper, coat with honey, and hang near fruit flies
- Replace when full or no longer sticky
While not the most attractive solution, sticky traps are highly effective at catching adult flies. The yellow color attracts fruit flies, and once they land on the sticky surface, they’re trapped.
8. Vacuum Method
For immediate reduction in fruit fly populations.
What you’ll need:
- Vacuum cleaner with hose attachment
How to do it:
- Turn on the vacuum
- Hold the hose near clusters of fruit flies
- The suction will pull them in
- Empty the vacuum bag or container outside afterward
This method provides instant gratification by immediately reducing the number of flying adults. While it doesn’t address the source of the problem, it can provide immediate relief while your other control methods take effect.
9. Beer Trap
The yeast in beer makes it an excellent fruit fly attractant.
What you’ll need:
- A small amount of beer (flat beer works fine)
- A container
- Plastic wrap
- Toothpick
How to make it:
- Pour beer into a container (about 1/2 inch)
- Cover with plastic wrap
- Poke several small holes
- Place near fruit fly hotspots
This works similarly to the wine and vinegar traps but uses beer’s yeasty aroma as the attractant. Some fruit flies seem particularly drawn to beer, making this an effective alternative if the vinegar trap isn’t working as well as you’d hoped.
10. Professional Fruit Fly Traps
When you want a ready-made solution.
What to look for:
- Traps specifically designed for fruit flies (not general flying insect traps)
- Products containing food-based attractants rather than harsh chemicals
- Options that blend with your décor if aesthetics are important
How to use them:
- Place according to package directions
- Position near problem areas
- Replace as recommended by the manufacturer
While homemade traps can be very effective, commercial options are often designed to be more attractive and may contain specially formulated attractants that work particularly well for fruit flies.
11. Milk, Sugar, and Pepper Trap
This old-fashioned remedy has been used for generations.
What you’ll need:
- 1 cup milk
- 1/4 cup sugar
- 2 tablespoons ground black pepper
- A shallow bowl
How to make it:
- Combine all ingredients in a saucepan
- Heat until simmering, stirring to dissolve sugar
- Simmer for 10 minutes
- Pour into a shallow bowl and place it where fruit flies gather
This mixture creates a toxic environment for fruit flies. The sweetened milk attracts them, but the pepper contains a compound that’s fatal to these tiny insects.

12. Candle Trap
Use light to attract and eliminate fruit flies at night.
What you’ll need:
- A candle
- A shallow dish
- Water or vinegar
How to make it:
- Fill the dish with water or vinegar
- Place the candle in the center
- Light the candle in a darkened room
- Position away from flammable items and never leave unattended
Fruit flies are attracted to the light, especially in a dark room. As they fly toward the flame, many will fall into the liquid and drown. This method works best at night when other light sources are minimized.
13. Electronic Insect Zapper
A high-tech solution for persistent problems.
What to consider:
- Small indoor bug zappers designed for flying insects
- Models that use UV light to attract flies
- Units appropriate for kitchen use
How to use it:
- Place the zapper in areas with high fruit fly activity
- Turn on according to the manufacturer’s instructions
- Empty the collection tray regularly
While more expensive than homemade traps, electronic zappers can be very effective and provide continuous control without having to make new traps regularly.
14. Fresh Basil Deterrent
Harness the natural repellent properties of this common herb.
What you’ll need:
- Several pots of fresh basil
How to use it:
- Place potted basil plants near fruit bowls, on windowsills, and in other problem areas
- Crush a few leaves occasionally to release more of the fragrant oils
Basil contains compounds that repel many insects, including fruit flies. As a bonus, you’ll have fresh basil available for cooking! Other herbs with similar properties include mint, lavender, and rosemary.
15. Freezing Fruits
Change how you store produce to minimize attraction.
What to do:
- Store ripe fruits in the refrigerator rather than on the counter
- Keep only underripe fruit out at room temperature
- Consider freezing overripe fruits for later use in smoothies or baking
By keeping ripe fruits cold, you reduce the fermentation process that attracts fruit flies. This is particularly effective when combined with traps to catch existing flies.
16. Professional-Grade Fruit Fly Killer
For severe infestations that don’t respond to other methods.
What to look for:
- Products specifically formulated for fruit flies
- Options are safe for use in kitchens and food preparation areas
- Natural pyrethrin-based products, when possible
How to use it:
- Follow all package directions exactly
- Remove or cover all food items before application
- Ensure proper ventilation
- Keep pets and children away during and after application as directed
While I generally prefer natural methods, sometimes a persistent infestation requires stronger measures. Look for products that target fruit flies specifically and are rated for kitchen use.

Here are some effective tips to prevent fruit flies in the kitchen:
1. Dispose of Ripe/Overripe Produce Promptly:
- Fruit flies are attracted to the fermenting sugars in ripe and overripe fruits and vegetables.
- Take out the trash regularly and don’t let produce sit out on the counter.
2. Clean Spills and Crumbs Immediately:
- Wipe up any spilled liquids, juice, or crumbs right away, as these can attract fruit flies.
- Pay special attention to areas like under the sink, in the garbage disposal, and around the trash can.
3. Store Food Properly:
- Keep all food, including ripe fruits and vegetables, in airtight containers or the refrigerator.
- Seal up any cracks or entry points where fruit flies could get in.
4. Maintain Good Drain Hygiene:
- Clean and disinfect kitchen drains regularly to remove any organic buildup that could attract fruit flies.
- Pour boiling water or a baking soda and vinegar solution down the drain.
5. Seal Entry Points:
Use caulk or sealant to close up any cracks, crevices, or openings where fruit flies could enter the kitchen.
Staying on top of kitchen cleanliness and removing any attractive food sources are key to preventing and eliminating fruit fly infestations.
When to Call the Professionals?
While most fruit fly infestations can be handled with the methods described above, there are situations where professional help might be warranted:
- If you’ve tried multiple methods over several weeks with no improvement
- If you cannot locate the source of the infestation
- If the infestation extends beyond the kitchen to multiple areas of your home
- If you have a commercial kitchen or food service business where regulations may require professional pest control
Professional exterminators have access to stronger treatments and have the expertise to identify hidden breeding sources that might be overlooked in DIY efforts.
FAQs
1. How do fruit flies get into my house if all the windows are closed?
Fruit flies are incredibly small and can enter through tiny cracks and openings. They also commonly hitch rides on fruits and vegetables from the grocery store, where eggs may already be laid in the produce.
2. How long do fruit flies live?
Adult fruit flies typically live about 30 days, but during that time, females can lay hundreds of eggs, which is why populations seem to explode so quickly.
3. Are fruit flies dangerous?
While fruit flies don’t bite or sting, they can potentially spread bacteria as they move from rotting matter to food surfaces. Their greatest threat is contamination of food and the general nuisance they create.
4. Can fruit flies lay eggs in sealed containers?
Fruit flies cannot penetrate truly sealed containers. However, what seems sealed to us might have tiny openings large enough for fruit flies. They can also lay eggs on fruit before it’s placed in containers, allowing the eggs to hatch inside.
5. Will fruit flies go away on their own?
Without intervention, fruit fly populations will continue to reproduce as long as they have food sources. Once you eliminate their food and breeding sites, existing adults will eventually die off, but this can take time.
6. What’s the difference between fruit flies and drain flies?
Fruit flies are typically light tan or brown with red eyes and are attracted to fermenting produce. Drain flies (also called moth flies) are small, fuzzy, moth-like insects that breed in the organic matter built up in drains. The treatment methods can be similar, but identifying which type you have helps target the correct breeding sites.
7. Do ultrasonic repellent devices work for fruit flies?
Scientific evidence does not support the effectiveness of ultrasonic repellent devices for fruit flies or most other insects. You’re better off using the proven methods outlined in this article.