Flies and Gnats in Your Trash Can: Where They Come From and How to Stop Them
October 13, 2026 · Bin Bros KC Team
Housefly macro by Irina Petrova, Wikimedia Commons, CC BY 4.0
The flies in your trash can almost certainly did not fly in from outside. They hatched in there. That changes what you should do about it, because swatting, spraying and trapping all treat the adults, and the adults are the least important part of the problem.
Key takeaway: Identify the fly first. Big buzzing flies mean food waste and maggots. Tiny tan flies hovering at the opening mean fermenting sugar, usually from the recycling cart and not the trash. Fuzzy moth-shaped flies that sit still on the wall mean a gelatinous film in the bottom. Thin dark gnats with long legs mean wet organic debris. Each has a different source, and in every case removing the breeding surface is the whole fix.
Flies pouring out when you lift the lid? Let the Bros clean it.
Cloud of flies every time you open the lid? We clean the cart at your curb with 200°F water, no soap and no chemicals, and the heat destroys the eggs and the film they feed on. Code FIRST50 takes 50% off your first clean.
Book in 60 seconds — 50% off with FIRST50 →Four different insects, four different sources
"Flies in the trash can" covers at least four creatures that behave nothing alike. Two minutes of identification saves a month of spraying the wrong thing.
| What you see | Likely insect | What it's breeding in |
|---|---|---|
| Large, loud, grey-bodied, bumps the lid | House fly or blow fly | Exposed food waste in the cart |
| Tiny, tan, red eyes, hovers at the opening | Fruit fly | Fermenting sugar, often in the recycling |
| Small, fuzzy, moth-shaped, sits still then flutters | Drain fly (moth fly) | Slimy organic film in the bottom |
| Thin, dark, long legs, drifts up off the debris | Fungus gnat | Damp yard waste, soggy paper, wet leaves |
House flies and blow flies
The ones everybody pictures. House flies (Musca domestica) and blow flies (Calliphoridae) are big enough to hear, and they are in your cart because there is food waste they can reach. An adult lays a large batch of eggs at once, the eggs hatch within 8 to 20 hours in warm weather, and the larvae feed for 5 to 11 days before pupating.
So if you have house flies, you have maggots, whether or not you have looked. The full procedure is in how to get rid of maggots in a trash can: boiling water first, then residue removal, then dry it out with the lid open.
Fruit flies
Small, tan, red-eyed, hovering rather than buzzing. Fruit flies are not interested in your garbage in general. They are interested in fermentation, meaning sugar that yeast has gotten into: soda film in the bottom of a can, the last inch of a beer bottle, wine residue, pasta sauce in the jar, a sticky juice box.
Here is the part most people get wrong. The fruit flies are usually breeding in the recycling cart, not the trash cart. Rinsed containers still leave a sugary film, and a recycling cart emptied every other week is a fermentation chamber with a lid on it. The bin cleaning frequency guide makes the same point: the recycling cart needs cleaning less often than the trash cart, not never.
Fruit flies need only a thin film to complete a generation, and in warm weather egg to adult takes roughly a week to ten days. That is why they seem immortal. You are not seeing the same flies for a month, you are seeing three generations.
Drain flies
Also called moth flies. Fuzzy, dark, shaped like a tiny moth, and bad fliers, so they sit still on a surface then flutter a short distance when you get close. The diagnosis is specific and unflattering: there is a gelatinous organic film somewhere, and drain fly larvae live inside the film itself.
In a cart, that film is the layer in the bottom four inches that a hose will not touch, the same biofilm covered in what's actually growing in your trash can. Spray the adults and new ones emerge from the film within days. Removing the film is the only thing that works. If you are seeing them indoors, check the sink and floor drains before blaming the cart — same insect, same film, different location.
Fungus gnats
Thin, dark, long-legged, faintly mosquito-shaped, and they come up in a little cloud when you disturb damp debris. Fungus gnats breed in wet organic matter: soggy grass clippings, a split bag of wet leaves, pumpkin guts, paper sitting in standing water. Worth checking your houseplants too, since overwatered potting soil is their favorite habitat and the cart may just be where you noticed them.
October is their season here. A cart holding leaf bags and a collapsing jack-o'-lantern is better habitat than it was in August, which is why we keep saying don't put a rotting pumpkin straight in the cart and to follow the fall leaf bag rules instead of loading clippings loose.
Flies and maggots are the same animal
A maggot is a fly that has not finished. Eggs, larvae, pupae, adults — one life cycle, four stages, and your cart can hold all four at once.
Kill the adults and the larvae mature to replace them, which is all a fly strip ever does. Kill the larvae and leave the residue and new adults lay again, which is what boiling water alone does. Remove the food and the film and the cycle has nowhere to run. That last one is the only durable fix, and it is also why "the flies went away on their own" is usually not good news. The quiet stretch is between generations.
What actually works, in order
Step 1: Find the source (10 minutes)
Open both carts in daylight and tip them toward you.
- Crawling in the waste means house flies. Go to the maggot procedure.
- A sticky brown film with a sweet-sour smell means fruit flies, and the recycling cart is the prime suspect.
- A slick, gelatinous layer in the bottom means drain flies.
- Wet matted paper, clippings or leaf matter means fungus gnats.
- Chew marks on the lid or corners means a bigger issue than flies. Read the rodent evidence checklist.
Step 2: Boiling water (10 minutes)
Do this after your hauler has emptied the cart, not before. Boil a full kettle, carry it out, pour it slowly over the bottom and lower walls. Heat kills larvae and eggs on contact and starts loosening the greasy layer underneath. Get under the lid rim, which is where eggs hide and where almost nobody looks.
Step 3: Break up the film (15 minutes)
This step decides whether the flies come back. Boiling water softens the film; something has to physically remove it.
A stiff long-handled brush and the hottest water your tap gives you handles a cart that is merely dirty. For anything older, an enzyme cleaner is the one household product that digests organic matter instead of covering it, and it only works if you leave it wet for a few hours. Drying out stops the enzymes.
Do not reach for bleach. It degrades the plastic over time, does very little about a grease film, and decomposing waste gives off ammonia, which is a bad thing to introduce bleach to inside a closed cart. The chemistry is in why bleach in a trash can backfires. If the residue is baked on past what a brush will touch, stuck-on residue fixes covers what is next.
Step 4: Dry it with the lid open (2-4 hours)
Flip the cart or prop the lid wide and leave it in the sun. Moisture is what all four of these insects need. This is also when you find out whether you have mold or mildew, which are not the same problem and not treated the same way.
Step 5: Change two habits
Bag every bit of wet waste in a sealed bag before it goes in the cart, and rinse both carts the day the hauler empties them, not the day before. If you do not know your day, the Northland trash day map has it. The summer prevention guide is the longer version, and what not to put in a residential cart covers what creates the mess upstream.
What does not work
- Fly strips and sticky traps. They catch adults that already hatched. The next generation is in the film.
- Aerosol insecticide sprayed into the cart. Kills adults, misses eggs, leaves chemical residue in the container your food waste goes into.
- Apple cider vinegar traps. Genuinely useful for measuring a fruit fly population. They do not remove a breeding site, so the count never reaches zero.
- Ultrasonic repellers. No effect on flies.
- Air fresheners. Pleasant. Not insecticidal, not a cleaner.
- Bleach. Covered above.
Where DIY stops working
For a cart a few months into being dirty, the steps above work, and if you have the time and a brush you should do them. Three things are what actually stop people.
A garden hose is cold. A hose runs around 50 PSI at whatever temperature comes out of the ground, and grease and biofilm need heat to release. Bacterial membranes break down above roughly 160°F; the Department of Energy's recommended household water heater setting is 120°F, so even your hot tap does not reach it. A consumer pressure washer gets you to about 2,000 PSI and is still cold, which is why cold pressure washing leaves the film behind no matter how good the spray looks.
The runoff has to go somewhere. Cleaning a cart properly produces twenty-plus gallons of filthy water with grease, bacteria and larvae in it. A storm drain is the wrong answer, because storm drains run to creeks untreated. A lawn means spreading it where kids and dogs play. Nobody writing about DIY bin cleaning mentions this, and in a neighborhood like Weatherby Lake it is not abstract. Most homes have no practical answer, which is the quiet reason DIY usually stops after the second attempt.
Bleach is what people reach for when the first two fail. It damages the plastic, reacts with the ammonia from decomposing waste, and does nothing about the grease. The ammonia smell post explains where that ammonia comes from.
Who should not pay someone for this
The most common thing we hear at the door is not about price. It is some version of "I didn't even know this was an option." So, plainly: it is an option, and here is when it is not worth it to you.
One cart, you bag your wet waste, you rinse on pickup day, and you have a sanitary drain you can legally empty a bucket into — keep your money. You are already doing the thing, and a fly outbreak in that cart is a one-afternoon problem, not a subscription. It is worth paying for if the flies have come back more than once this season, if the film no longer responds to a brush, if you have two or more carts, or if you are simply not going to do it.
What is different about how we do it is an absence. No soap and no chemicals at any step. Water at 200°F does the sanitizing, and the only thing added after is a pet-safe deodorizer made with essential oils. We will be straight about the number everyone quotes, though: 200°F is not a differentiator, and competitors advertise 230°F and 250°F. The heat is table stakes. The defensible part is that nothing goes into your cart you would not want your dog sniffing or your grass absorbing.
Quick answers
How do I get rid of flies in my trash can?
Identify the fly, then remove its breeding surface. For large house flies, pour boiling water over the larvae, scrub out the food residue, and dry the cart with the lid open. For tiny fruit flies, find the fermenting sugar, usually the recycling cart rather than the trash. For fuzzy drain flies, physically remove the gelatinous film in the bottom. Killing adult flies with sprays or strips does not work, because the next generation is already inside the cart.
Why do I have tiny flies in my garbage can but no maggots?
Because they are not house flies. Tiny tan flies with red eyes that hover at the opening are fruit flies, breeding in a thin film of fermenting sugar. Small fuzzy moth-shaped flies are drain flies, breeding in the slimy layer in the bottom. Thin dark long-legged gnats are fungus gnats, breeding in damp yard waste or soggy paper. None of them produce the large white maggots people expect.
Are the gnats in my trash can coming from the recycling bin?
Often, yes. Rinsed cans, bottles and jars still leave sugary residue, and a recycling cart that sits two weeks ferments it. If you have treated the trash cart twice and the small flies keep returning, clean the recycling cart next.
Does vinegar get rid of flies in a trash can?
Partly. A dish of vinegar traps some adult fruit flies, and diluted white vinegar deodorizes and mildly disrupts eggs. Neither removes the organic film the larvae live in, so the flies return on their own schedule. Treat vinegar as a smell treatment, not a solution.
Will bleach kill flies in my trash can?
It kills what it touches, and you should still not use it. Bleach degrades cart plastic, does essentially nothing about the grease film the larvae feed on, and decomposing waste releases ammonia, which bleach reacts with inside a confined cart. Boiling water kills larvae and eggs just as fast with none of that risk.
Do flies in the trash stop in the fall?
Not until it freezes. In the Kansas City Northland, October still runs warm enough for fruit flies and fungus gnats, and a cart holding leaf bags, clippings and a rotting pumpkin is better habitat in October than in August. Adult activity drops off after the first hard freeze.
How often does a cart need cleaning to stay fly-free?
Four times a year handles most Northland households, monthly if you have pets, diapers, or a cart in full sun. The frequency guide walks through how to choose and the cost breakdown is short if that is the real question.
What to do right now
- Open both carts and look at the bottom four inches. Not at the trash. At the floor and the lower walls. That tells you which insect you have and whether a brush will be enough.
- Boiling water tonight, film removal this weekend, lid open to dry. In that order. Skipping the film step is why it comes back.
- Start bagging wet waste and rinsing on pickup day. Those two habits prevent most of this permanently, and they are free.
- If you would rather not deal with it, try one clean at half price. Code
FIRST50drops a first quarterly clean to $22.50, and the quarterly plan runs $45 a clean billed at $15 a month with a second cart at $5. Book your first clean here, tell us your trash day, and we come the morning after pickup.
Flies in a cart are not a mystery and they are not bad luck. They are a food source with a lid on it. Take the food source away and they have no reason to be there.
Related reading: how to get rid of maggots in a trash can, the summer prevention plan, why bleach backfires, what's growing in a dirty cart, and the DIY vs. professional math.
Flies pouring out when you lift the lid? Let the Bros clean it.
200°F water. No chemicals. Pet-safe. No contracts. Code FIRST50 takes 50% off your first clean.