How to Get Rid of Fruit Flies? A Trap That Works and Prevention
updated 11 July 2026
Quick answer
The fastest way to get rid of fruit flies is a trap: pour apple cider vinegar into a small bowl, add a drop of dish soap, and cover it with plastic wrap punched with a few holes. The flies get in and drown, because the soap breaks the surface tension of the vinegar. At the same time, remove the cause: overripe fruit, scraps in the trash, and buildup in the sink drain.
Step by step
- 1
Make an apple cider vinegar trap
Pour 3-4 tablespoons of apple cider vinegar into a small bowl or jar and add a single drop of dish soap. Stir gently - the soap keeps the flies from resting on the surface, so they drown. You can drop in a piece of ripe fruit to boost the scent.
- 2
Cover the trap with punctured plastic wrap
Stretch plastic wrap over the container and poke a few holes the size of a match head. The insects fly in toward the smell but cannot find their way back out. Instead of wrap, you can roll a paper funnel and put it narrow end down into a jar.
- 3
Place traps where the flies gather
Set two or three traps near the trash, the fruit, and the sink, because that is where fruit flies gather most. Leave them for 3-5 days and replace the contents once plenty of insects have collected. Several small traps work better than one big one.
- 4
Remove the source: their food and breeding ground
Throw out overripe fruit and vegetables and put the rest in the fridge. Empty and wash the compost bin, because eggs are laid in damp scraps. Also check forgotten bottles of wine, juice, and beer, and damp dishcloths.
- 5
Clean the sink drain and trap
Fruit flies often breed in the sludge inside the pipes, so pour boiling water down the drain, followed by a cup of baking soda and a cup of vinegar. After 15 minutes, flush with hot water to wash away the film where the larvae develop. Wipe the drain grate and the rubber seal too.
- 6
Wipe the surfaces and keep at it for a few days
Wipe the counters, cutting board, and the area around the trash with water and a splash of vinegar to remove scent traces. Fruit flies multiply fast, so keep up the cleaning and the traps for about a week. One forgotten piece of fruit is enough for the population to bounce back.
Where fruit flies come from and how long they live
Fruit flies arrive drawn by the smell of fermentation - a ripening banana, spilled juice, or a damp trash bin is enough. Very often they come home as eggs already laid on the skin of store-bought fruit, which is why they seem to appear suddenly and in large numbers.
An adult fruit fly usually lives two to four weeks, but in warm conditions it breeds at lightning speed. From egg to adult takes only about 8-10 days at room temperature, and a single female lays up to several hundred eggs. That is why you have to solve the problem at the source, not just catch the adults.
The most common mistakes when fighting fruit flies
The biggest mistake is putting out traps without cleaning. A trap catches adult flies, but if larvae are developing in the trash or the drain, a new generation hatches within days. Without removing the breeding sites, the fight never ends.
The second mistake is overlooking the less obvious spots: overwatered plant pots, damp sponges, open wine, or leftover pet food. Even a kitchen that looks clean can hide a reservoir like that.
How to keep fruit flies from coming back
Keep fruit in the fridge or eat it promptly, and check anything ripening on the counter every day. Empty and wash the compost bin often, and flush the sink drain with boiling water once a week.
It is worth rinsing freshly bought fruit to wash any eggs off the skin. In summer, a window screen helps too, because some fruit flies simply come in from outside.
Frequently asked questions
›How long does a fruit fly live?
An adult fruit fly lives 2 to 4 weeks on average. The full development from egg to adult takes only about 8-10 days at room temperature though, which is why the population grows so fast.
›What vinegar works best on fruit flies?
Apple cider vinegar works best, because its fruity, fermented smell strongly attracts the flies. If you do not have any, use leftover wine, beer, or plain vinegar with a piece of ripe fruit. Always add a drop of dish soap.
›Why do fruit flies keep coming back despite the traps?
That is a sign the breeding site has not been removed - usually scraps in the trash, sludge in the drain, or an overwatered plant pot. Traps catch the adults, but new larvae keep hatching. Clean up the source and treat the traps as a supplement.
›Where do the flies come from when there is no fruit around?
Fruit flies breed anywhere there is moisture and fermenting residue: in the sink drain, the compost bin, plant pots, or damp dishcloths. Sometimes they simply fly in through the window. A small amount of organic buildup is all they need to multiply.
›Are fruit flies a danger to food?
They do not bite or damage anything, but as they move between waste and fruit they can carry microbes onto your food. That is why it is worth dealing with them quickly and covering food. Fruit they have walked on just needs a thorough wash.