Trash can fruit flies
A trap alone will not fix this. Fruit flies breed in a specific damp spot, and until you find it the trap just fills up while they keep coming.
By Ryder M. · Last reviewed September 27, 2026

Why the order matters
A fruit fly goes from egg to adult in about a week, and a female lays hundreds of eggs. So if a breeding site is still producing, a trap removes adults slightly slower than the site makes new ones — and you conclude the trap does not work.
The fix is therefore always two things in sequence: remove the breeding site, then trap the adults that are already flying. Doing the second without the first is the mistake almost everyone makes, and it is why people end up buying three different traps.
The good news is that the site is almost always in one of six places, and once it is gone the population collapses within about a week because the existing adults simply die off.
Step one: find the breeding site
Fruit flies breed in damp, fermenting organic residue — not in dry trash. Check these six, roughly in order of likelihood.
- Residue in the bottom of the trash can. Under the bag, where a leak has dried into a film. This is the single most common site and it is invisible until you take the bag out.
- The compost caddy. By definition a bin of fermenting organic matter. If you have one and you have fruit flies, start here. Caddies that seal.
- The sink drain and the garbage disposal. A film of organic matter builds on the inside of the drain and in the disposal splash guard. This is the site people never think of, and it is extremely common.
- A forgotten potato, onion or piece of fruit. At the back of a cupboard, in a vegetable rack, under something. One rotting potato will sustain a substantial population.
- Recycling that was not rinsed. A beer bottle, a juice carton, a jar with a film of jam — a rinsed container is inert, an unrinsed one is a breeding site.
- Under or behind the can itself. Liquid that ran down the outside and pooled on the floor, or behind a kickboard.
A practical way to narrow it down: watch where they settle when the room is quiet. Fruit flies hover near their breeding site rather than distributing evenly, so if they cluster around the sink it is the drain, and if they cluster around the can it is the can.
Step two: clear it
Step 01
Empty and wash the can properly
Hot water and dish soap, including the underside of the rim and the base, then dry completely. Residue under the bag is the most likely site and a wipe will not do it. The full method.
Step 02
Flush the drain
Pour a kettle of boiling water down the sink drain, then scrub inside the drain opening and under the splash guard of a garbage disposal with a bottle brush. The film is on the vertical surfaces just inside the opening, which is why pouring alone often is not enough.
Step 03
Find the fruit or vegetable
Check the vegetable rack, the back of cupboards, the fruit bowl, and under appliances. One rotting item is enough. Move anything ripe into the refrigerator for a week while you deal with this.
Step 04
Rinse recycling before it goes in the bin
Permanently, not just this week. An unrinsed jar or bottle is a breeding site sitting in an open crate, and it is the reason fruit flies persist in kitchens that are otherwise spotless.
Step 05
Keep food scraps out of the room
Freeze them until collection day, or use a sealed caddy emptied daily. Frozen scraps cannot ferment, so there is nothing to lay on.
Step three: trap the adults
Now a trap works, because nothing is replacing what it catches. Two approaches, and which you need depends on what is actually flying.
A liquid food lure works on fruit flies specifically, because fruit flies want fermenting fruit. It is passive, cheap and effective, and a commercial trap gives you a consistent lure rather than a bowl of vinegar that evaporates. A light trap catches fruit flies and fungus gnats, which matters because gnats ignore a food lure entirely — if your trap is sitting empty while insects circle the room, you probably have gnats rather than fruit flies, and the source is a houseplant rather than the bin.
One liquid-lure trap and one light trap. Buy the liquid one first — it is cheaper and it is the right tool for genuine fruit flies.

Best fruit fly trap
TERRO Fruit Fly Trap
A non-toxic liquid lure in an apple-shaped housing, rated for about 45 days — the standard answer to fruit flies near the bin.

Best plug-in trap
Zevo Flying Insect Trap
A plug-in light trap with a no-mess adhesive cartridge, for kitchens with gnats as well as fruit flies.
The homemade version
Apple cider vinegar with a drop of dish soap in a bowl works, and we would rather tell you that than not. The soap breaks the surface tension so the flies sink rather than landing and leaving. It is less consistent than a commercial lure and it evaporates, so refresh it every couple of days. If it costs you nothing to try, try it first.
Stopping them coming back
- A can with a sealing lid. A sealed lid is a physical barrier, which is why sensor cans and damped-lid step cans tend to have fewer fly problems than open ones. Not magic — just a closed lid most of the time. Touchless cans.
- Rinse recycling, every time. The highest-return permanent habit in this list.
- Keep ripe fruit in the refrigerator in summer, or at least not next to the bin.
- Empty the caddy daily if you run one, or freeze scraps instead.
- Flush the drain monthly with boiling water, whether or not you have a problem.
Common questions
How do I get rid of fruit flies in my trash can?
Find and clear the breeding site first — usually residue under the bag, the sink drain, or a rotting vegetable — then trap the remaining adults. Trapping without clearing the site does not work, because new flies replace the ones you catch.
Why does my trash can keep getting fruit flies?
Something damp and fermenting is still present. The six usual sites are residue under the bag, a compost caddy, the sink drain or disposal, a forgotten potato or onion, unrinsed recycling, and liquid pooled under the can.
Do fruit fly traps actually work?
Yes, once the breeding site is gone. While a site is still producing, a trap removes adults slower than new ones emerge, which is why people conclude traps do not work.
Does apple cider vinegar get rid of fruit flies?
It works as a lure — add a drop of dish soap to break the surface tension so they sink rather than landing and leaving. It is less consistent than a commercial lure and needs refreshing every couple of days, but it costs nothing to try.
What trash can prevents fruit flies?
One with a lid that genuinely seals, kept closed. A sealed lid is a physical barrier. No can prevents them if the breeding site is the drain or a rotting potato rather than the trash.
Are they fruit flies or fungus gnats?
Fruit flies cluster around food, fermenting liquid and the bin. Fungus gnats cluster around houseplants and breed in damp potting soil. A liquid food lure catches the first and ignores the second.
Read next
- Odor ControlThe free fixes first, then filters, deodorizers and cans built to contain smell.
- How to clean a trash canThe full method, including the underside of the rim everyone misses.
- How to get rid of maggots in a trash canBoiling water, safely — plus why they appeared overnight and how to stop it.
- The best touchless trash cans of 2026Seven sensor cans compared on sensor behavior, battery life and warranty.
- The best countertop compost binsFive caddies compared on cleanability, filters and how sour they go.
- The best trash cans for odor controlSix cans compared on lid seal, filter slot and how they handle wet waste.
The author
Ryder M.
Owner and editor of Lid & Liner, published by Magoo Media Group. He started the site after getting tired of the same problem everyone has: every “best trash can” article covers ten products and none of them tells you whether a 13-gallon bag actually fits a 13-gallon can. Lid & Liner covers one category and tries to cover it completely.
Last reviewed September 27, 2026. Spotted an error? Tell us and we will correct it and note the correction.