Where do fruit flies come from? Mostly in on the fruit
Fruit flies come in two ways: as eggs on fruit or veg that was already going over, or as adults through a window or door. Then they breed in anything fermenting and damp. Here is every route in, and how to find the one in your kitchen.
By The Pest GuyLast updated
The short answer
Nothing came from nowhere. Something came home with you, or flew in, and found something fermenting.
Fruit flies come from two places. Most often they arrive as eggs on fruit or veg that was already over-ripe and infested before it reached your kitchen. The University of Kentucky says exactly that: infestations can start from fruit or vegetables that were previously infested and brought into the home. The rest fly in through an open window or door, following the smell. Both routes are busiest in late summer and autumn.
Either way they then breed in whatever is fermenting. A female lays about 500 eggs and the cycle from egg to adult can be done in about a week, which is why it goes from one fly to a cloud so fast. The details of that cycle are in how long fruit flies live.
So the job is to find the thing that is fermenting and get rid of it. Then catch the adults that are still flying, because every one of them is looking for somewhere to lay.
Every way fruit flies get into a house
Seven routes, what is going on in each, and what to do about it. The first two are about the fruit itself.
| Where they came from | What is going on | What to do | Source |
|---|---|---|---|
| Fruit or veg that came home already carrying eggs | Over-ripe produce that was infested before it reached you. The eggs are under a fifth of a millimetre wide. | Bin or refrigerate anything split, bruised or going soft | University of Kentucky; BioNumbers (Harvard) |
| Produce from the garden or allotment | Tomatoes, melons, squash and grapes brought in from the garden are often the cause. One soft-fruit species, in Britain since 2012, lays under the skin of otherwise unblemished soft fruit. | Eat or chill homegrown soft fruit quickly; do not leave it out to ripen | University of Kentucky; RHS |
| An open window or door | Adults fly in from outside, drawn by the smell of anything fermenting | Close up or fit fine mesh screens; Kentucky specifies 16 mesh | University of Kentucky; University of Maryland |
| A peel or core you cannot see | Banana peels or apple cores swept under furniture or appliances can support significant numbers | Pull out the fridge and check under the cooker and units | University of Wisconsin |
| A slow or little-used drain | A layer of slime builds up above the water line and they breed in it. No fruit needs to be in the house. | Tape a clear food bag over the plughole overnight; flies in the bag means that drain | Iowa State; University of Kentucky |
| Bins, recycling, bottles and cans | Juice, wine or beer left in a bottle, or a recycling bin that is never emptied or cleaned | Rinse and drain recycling, empty the caddy, wash the bin | University of Kentucky; University of Maryland |
| Mops, cloths and wet spots | Damp mops and rags, wet areas under dripping pipes, and fridge drain pans | Dry mops and cloths, fix the drip, clean the drain pan | University of Kentucky; Iowa State; University of Wisconsin |
Sources: University of Kentucky entomology fact sheet ENTFACT-621; Iowa State University Extension; University of Wisconsin; University of Maryland Extension; Royal Horticultural Society; BioNumbers (Harvard Medical School), all read October 2026. Fine mesh helps keep adults out. It does nothing about eggs that came in on the shopping.
Why they seem to appear from nowhere
The eggs were there all along. You just could not have seen them.

A fruit fly egg is 0.18 mm wide. Across the Drosophila species that have been measured, the eggs run from 0.44 to 0.57 mm long. That is roughly half a millimetre, laid on the surface of something already going soft. You will not spot one on a banana.
The female lays them on the surface of the food or fermenting liquid, and the maggots feed there for five or six days before crawling somewhere drier to pupate. Then the adults come out. So a bag of fruit that looked fine on Saturday can be lifting off flies the following weekend, with nothing ever seen arriving. If you want to know what the eggs and maggots look like once they are big enough to see, that is in where fruit flies lay their eggs.
Homegrown fruit has one extra wrinkle worth knowing. Spotted wing drosophila, which the RHS says was first reported in Britain in 2012, has a saw-like egg-laying organ and lays under the skin of developing fruit. Unlike most other fruit flies, it can damage soft and stone fruit that is otherwise unblemished. Strawberries, raspberries, blackberries, blueberries, currants, grapes, cherries and plums are all on the RHS list. A perfect-looking punnet off the allotment can still be carrying eggs.
The University of Kentucky makes the same point about the veg patch in general: tomatoes, melons, squash and grapes brought in from the garden are often the cause of an infestation indoors.
What they are actually after is the yeast
This is why the answer to 'which fruit causes the most' is whichever one is going off.
Fruit flies are drawn to fermenting fruit, and the fermenting is the important bit. Yeast grows on fruit as it goes over. A 2012 study published in Functional Ecology found that baker's yeast on its own was enough to attract fruit flies, get them laying eggs and raise their larvae. Unfermented grape juice drew significantly fewer, and grapes with no yeast on them did not support the larvae at all. The smell of the fruit itself was only of secondary importance.
The University of Wisconsin says the same thing from the other end: the larvae feed on the yeast in decaying or fermenting material. That changes how you look at the fruit bowl. A firm apple draws far less interest than one on the turn. The banana with a split in it, the tomato gone soft at the bottom and the grape that rolled behind the kettle are the ones doing the breeding.
It also explains why fruit is not the only source. The University of Maryland Extension lists wine, beer, fruit juice and vinegar as attractants too, and the yeast-smell blend in that 2012 study included acetic acid, the acid in vinegar. That is why a cider vinegar bait works, which is a subject of its own in why apple cider vinegar draws fruit flies.
The fruits extension services name most are bananas, tomatoes, melons, squash, grapes and apples, plus potatoes and onions once they rot. They are on the list because they are what gets left out until it splits. That is why the University of Maryland's prevention advice starts with refrigerating fruit.
When the fruit bowl is clear and they keep coming
Then something else is breeding them, and the drain is the first suspect.
Iowa State Extension is clear that fruit need not be present to have fruit flies. They will breed anywhere there is fermenting organic matter that stays wet. In a home, Iowa State's most likely candidate is a slow-moving or seldom-used sink, bath, shower or floor drain, with a layer of slime built up above the water line.
You can test a drain without taking anything apart, one plughole at a time, using the overnight bag test. Flies in the bag by morning hatched in that drain.
After the drain, the usual places are a recycling bin with a drop of wine or juice in the bottles, a food caddy, a damp mop, the drip tray under the fridge, and a peel or core that went under an appliance. The University of Wisconsin says a banana peel or apple core swept under furniture can support significant numbers of flies. Going room by room through all of them is what finding the source of fruit flies in the house covers.
Two lookalikes are worth ruling out before you start. Tiny flies round a plant pot are usually fungus gnats, which breed in wet compost, and the difference is set out in fruit flies vs fungus gnats. Drain flies are a separate insect again, breeding in the sludge left as water evaporates, and they are covered in flies in the house.
Why binning the fruit is not the end of it
The flies already in the room are still laying.
Getting rid of the source is the only thing that stops it for good. The University of Wisconsin puts it as the only way to completely stop the problem. But the adults that are already flying do not leave with the fruit. Each female can lay about 500 eggs, and all she needs is the next banana that goes soft.
Iowa State Extension says fly spray on the adults gives temporary relief at best, and spraying round the fruit bowl is not something most people want to do anyway. The better tool is a trap that catches them where they gather and keeps them. What makes a trap hold on to fruit flies, rather than letting half of them walk back out, is set out in the fruit fly trap guide, and the start-to-finish plan is in how to get rid of fruit flies.
So the order is: find what is fermenting and bin it, fix the drain or the bin if that is where they are coming from, then trap what is left until there is nothing left to catch. If they keep coming after all of that, there is still a source you have not found.
For the ones already flying
Once the fermenting fruit is gone, this catches the adults that are left, before they find the next thing to lay on. It catches fruit flies. If the bag test says a drain is breeding them, the drain still needs cleaning.
What I’d use
Reusable cider vinegar trap
Escape-proof fruit fly trap
A two-part cup and lid you fill with about 25 ml of cider vinegar and stand by the fruit bowl.
Eight slots in the lid feed a funnel that drops flies through one 4 mm hole into the dark middle of the cup. The brightest points a trapped fly can see are pinholes too small to get through, set away from the real exit, so the way out is the place they are least likely to look.
- Ways in
- Eight slots in the lid, into one funnel
- Way out
- One 4 mm hole, under the solid centre of the lid
- Holds
- About 25 ml of vinegar, to the moulded fill line
- Size
- 6.7 cm across, 5.4 cm tall
- Refills
- None to buy. It runs on cider vinegar from the cupboard
Watch out for
- Vinegar and washing-up liquid not included.
- Made for fruit flies. Flies from a plant pot or drain need the source found.
- Tip, rinse by hand and refill once it fills up.
That link earns me nothing. It is not an affiliate link, no brand pays for a mention here, and I get the same whether you buy this or ignore it. It is on the page because it is what the job takes.
No brand pays for a mention here, and nothing on this page earns me a commission. The card above links out to a shop, and I get the same whether you buy or ignore it. The link is there because finding the thing is the boring half of acting on advice, which is also why the watch-outs sit on the same card as the reasons to buy.
About this resource
The weight on this page is carried by university extension services (the University of Kentucky, Iowa State, the University of Wisconsin and the University of Maryland), the Royal Horticultural Society, Lewisham Council, and a 2012 study by Becher and colleagues in Functional Ecology. Egg sizes come from BioNumbers, Harvard Medical School's database of measured biological values.
The honest limit is your kitchen. This page can tell you every route in and how to test for each; it cannot tell you which one is yours. The bag test and a look under the fridge will do that faster than anything I can write.
Common questions
What causes fruit flies in the home?
Something fermenting that stays moist. Usually that is fruit or veg going over, and Lewisham Council puts it plainly: where fruit flies occur in a home, it is usually due to fermenting fruit or old vegetables. But Iowa State Extension points out that fruit need not be present at all. A slimy drain, a recycling bin that never gets rinsed, a damp mop or a peel under the fridge will all do.
What fruit causes the most fruit flies?
Whichever one is fermenting. The flies are after the yeast growing on fruit as it goes off, and a 2012 study found yeast on its own was enough to attract them and get them laying, with the fruit's own smell of secondary importance. The usual culprits named by extension services are bananas, tomatoes, melons, squash, grapes and apples, plus rotten potatoes and onions, because those are what tends to sit out until it splits.
Why do fruit flies seem to appear from nowhere?
Because they came in as eggs. A fruit fly egg is under a fifth of a millimetre wide, so you will not spot one on a banana skin, and the University of Kentucky says the whole cycle from egg to adult can be done in about a week. Fruit that was infested before it reached you can produce flying adults in your kitchen within days, with nothing ever seen arriving.
Can fruit flies come from drains?
Yes. Iowa State Extension says the most likely breeding site in a home, after the fruit, is a slow-moving or seldom-used sink, bath, shower or floor drain with a layer of slime built up above the water line. A bag over the plughole overnight shows whether yours is one.
Is my house dirty if I have fruit flies?
No more than anyone else's who brought home a bag of fruit. One of the main routes in is produce that was already carrying eggs before you bought or picked it. What keeps them going is a source that stays fermenting and damp, so the fix is finding that one thing rather than deep-cleaning the house.
Why am I suddenly infested with fruit flies?
Because a source got going a week or so ago. Each female lays about 500 eggs and the cycle takes around a week, so one forgotten piece of fruit turns into a cloud quickly. Iowa State Extension says persistent adults mean larvae are developing nearby, so if they keep coming back after the fruit bowl is cleared, something else is still breeding them.
Do fruit flies come from maggots?
Yes, every one of them was a maggot first. The larvae feed in the fermenting food for five or six days, then crawl to somewhere drier to pupate, according to the University of Maryland Extension, and the adult comes out of that pupa. That is why a mushy bit of fruit can produce flies after you think you have dealt with the ones flying about.