Sick of fruit flies swarming your polytunnel, greenhouse, or kitchen? These tiny pests seem to appear out of nowhere and multiply fast.
Fruit flies are a common nuisance, especially during warmer months when ripe produce and compost attract them in droves. In this article, we’ll show you how to get rid of fruit flies using simple, low-cost traps and natural methods. You’ll learn where fruit flies come from, how to remove them quickly, and how to keep them from coming back – whether you’re dealing with them indoors or in your growing space.
Key Points:
- Learn where fruit flies come from and how they breed
- Discover DIY fruit flies trap methods tested and reviewed
- Find out which bait works best to prevent fruit flies
- Explore natural and preventative solutions for polytunnels, greenhouses, and kitchens
- Get tips to stop fruit flies from returning in the future
Identifying the Problem

Before you can deal with them, you need to be sure you’re actually dealing with fruit flies. These pests are tiny — only around 2–4 mm long — with a light brown or tan body and bright red eyes.
You’ll usually spot them buzzing around fruit bowls, bins, compost heaps, or anywhere food is left out. In polytunnels, fruit flies tend to gather near ripening fruit or damp organic matter, such as mulch or rotting plant debris.
Where Do Fruit Flies Come From?
Fruit flies don’t just appear out of nowhere — they’re drawn in by smell. Overripe fruit, sticky spillages, or bins with old food are all major attractants. They lay eggs on fermenting or sugary surfaces, and because one female can lay hundreds of eggs, even a small issue can quickly become an infestation. In polytunnels, the warm, humid conditions make it easy for them to thrive if left unchecked.
The Lifecycle of Fruit Flies
Knowing how to get rid of fruit flies means understanding how fast they breed. Their entire lifecycle — from egg to adult — can take as little as 7 days. That means within a single week, you could go from spotting one or two flies to swatting away dozens. The best time to act is as soon as you notice even a small cluster.
How to Prevent Fruit Flies: Simple Elimination Tips
Here’s how to prevent fruit flies and stop them multiplying:
- Clean regularly: Wipe down surfaces, remove food waste, and rinse out recycling.
- Refrigerate ripe fruit: Don’t leave bananas, tomatoes, or berries out on countertops or in the open.
- Seal cracks and gaps: Block off common entry points and keep doors closed where possible.
- Use a fruit flies trap: Apple cider vinegar and dish soap in a jar works surprisingly well for catching them.
Keep the inside and outside of your polytunnel protected using polytunnel covers
The DIY Fruit Flies Trap Methods (Tested and Ranked)

If you’re wondering how to get rid of fruit flies without spending a fortune, DIY traps are a smart place to start. There are several tried-and-tested different homemade fruit flies trap methods that can be made using basic household materials. Each trap is made using a sweet bait to lure the flies in, followed by a mechanism to keep them from escaping.
Here’s how each method can be achieved— with full breakdowns of ease, appearance, and how well they actually worked.
What Bait Works Best?
Each trap (except one) can be made using the same simple bait:
- ¼ cup of apple cider vinegar
- A few drops of washing-up liquid
The vinegar draws in the fruit flies with its strong, sweet smell. The washing-up liquid breaks the surface tension so they sink instead of floating.
For the wine bottle test, you are best off using leftover red wine with some dish soap added in, rather than having to worry about cracking open and wasting a new bottle.
Materials Used in All Traps
You’ll need:
- Mason jars or similar glass containers
- Apple cider vinegar
- Liquid dish soap
- Plastic wrap
- Parchment or plain paper
- A near-empty wine bottle
- A hammer and nail (for lid version)
Testing the Traps
If you are trying each of these fruit fly traps for the first time, try setting these up on your windowsill first before adding it to your polytunnel or greenhouse. Once you are happy with the results, you can consider integrating them.
For better results, try using overripe bananas and watermelon close to your DIY fruit fly trap. You can judge which of the fruit fly trap methods works best based on this criteria:
- Ease of setup
- How tidy it looked
- Number of fruit flies caught
- Overall usefulness
1. Wine Bottle Trap

- Ease: 9
- Attractiveness: 4
- Effectiveness: 2
- Overall Rating: 5
Many gardeners may find this method to be the easiest — no prep, just leave out some wine with a drop of dish soap.
However, this method often doesn’t catch enough flies, proving that the results here can be insufficient, sadly.
Please note that you may find this method clunky since you would have a full wine bottle left sitting out for up to a week.
If you’re in a rush and have no jars to hand, it might be worth a go. But if you’re serious about how to prevent fruit flies, this won’t be your best bet.
2. Paper Cone in a Jar

- Ease: 2
- Attractiveness: 5
- Effectiveness: 5
- Overall Rating: 4
For this trap, simply use a paper cone in the mouth of a spare jar, with vinegar and soap in the bottom. The idea here is that the flies are drawn in but can’t find their way back out.
Be aware that the cone can be awkward to roll and may not stay in place well. Results may vary here in terms of its effectiveness.
3. Plastic Wrap Over Jar

- Ease: 9
- Attractiveness: 1
- Effectiveness: 5
- Overall Rating: 5
For this fruit fly trap, cover the top of your vinegar-and-soap jar with cling film, poke a few holes, and let it sit. Sounds easy, and it is — but this does not necessarily mean it will be effective.
It is possible to trap at least a handful of fruit flies here, but this can depend on the size of the holes in the plastic wrapping, because it may be easy for the flies to escape otherwise.
Also, if you are concerned about the tidiness of this trap on your windowsill, it may appear messy and not something you’d want in your kitchen for long.
4. Jar with Holes in the Lid (Best Trap!)

- Ease: 8
- Attractiveness: 6
- Effectiveness: 10
- Overall Rating: 8
Some gardeners consider this trap to be the most successful of the methods discussed. You simply just need to punch small holes in the jar’s lid using a nail and hammer. Inside, add your vinegar and dish soap.
Despite how tiny the holes looked, the fruit flies can still find a way in — luckily, they are less likely to come out.
As a whole, this method is neat, easy to handle, and very effective. If you’re wondering how to get rid of fruit flies with just one trap, this is the one to try.
5. Bonus: Red Wine & Plastic Wrap Trap
- What you need: Small jar, a splash of red wine, plastic wrap
- How it works: The smell of wine pulls in the flies, and the wrap traps them inside
- Effectiveness: Better than the wine bottle, worse than the jar with lid method
This trap sits somewhere in the middle. It’s a step up from the wine bottle (thanks to the smaller size and extra wrap), but not nearly as effective as the nailed lid version.
DIY traps are an easy and affordable way to deal with a fruit fly problem. While not all methods are as effective as each other, they each give insight into where fruit flies come from and how their behaviour can be used to trap them.
If you’re tired of swatting at pests in your kitchen or polytunnel, try setting up the nailed-lid jar method and keep it in place for a few days — it’s a small job that makes a big difference.
Can Fruit Flies Affect Your Health?
Although fruit flies don’t bite, they can still carry bacteria that may contaminate your food. Because they spend time around rubbish, compost, and even manure, they can pick up germs like E. coli and transfer them to anything they land on — especially fruit left out in the open.
Female fruit flies also lay eggs in soft, ripening fruit. This can lead to tiny larvae hatching inside the food, which is not only unpleasant but unhygienic. If you’re trying to figure out how to get rid of fruit flies, this is a good reason not to delay.
How to Keep Fruit Flies from Coming Back
Once you’ve cleared an infestation using a fruit flies trap or other methods, the next step is making sure they stay gone.
- Clean surfaces and bins often
- Don’t leave fruit or veg exposed
- Empty compost or food waste daily
- Rinse recyclables before storing them
Knowing where fruit flies come from helps you stop them at the source. The cleaner and drier your space, the less likely they’ll return.
Why Gardeners Trust First Tunnels
If you’re tackling how to get rid of fruit flies in a growing space, First Tunnels offers the tools to help. From high-quality domestic polytunnels to drip irrigation systems, fruit cages, and growing accessories, everything is designed to support healthy, pest-resistant gardening. Create a cleaner, more controlled environment and keep pests like fruit flies at bay.
Further reading:
Here are some further articles to keep pests away from your polytunnel on our blog:
- Rats in compost bins
- Garden pests
- How to get rid of rabbits
- How to stop slugs eating plants
- How to get rid of wasps
FAQs
Do fruit flies bite or carry disease?
No, fruit flies don’t bite, but they can carry bacteria from contaminated surfaces and spread it to fresh produce, which may increase the risk of foodborne illnesses.
Why are fruit flies common in polytunnels?
Polytunnels provide a humid, sheltered environment ideal for fruit flies, especially when overripe crops, compost, or fermenting mulch are present. Damaged or split fruits can also attract them quickly.
Can companion planting help repel fruit flies in a polytunnel?
Can fruit flies survive outdoors in winter?
No, fruit flies don’t usually survive freezing outdoor temperatures. However, they often move indoors or into warm, sheltered spaces like greenhouses, compost bins, or polytunnels during winter to continue breeding.
Do fruit flies only go for fruit?
No, fruit flies are also attracted to other sugary or fermenting items like juice, alcohol, vegetables, compost, and even food scraps in bins or drains. Any moist organic matter can draw them in.
Sources
WebMD Editorial Contributors. (2024) How Dangerous Is E.coli? WebMD. [online] Available at: https://www.webmd.com/food-recipes/food-poisoning/what-is-e-coli [accessed 11/06/2025]
