How to Keep Flies and Maggots Out of Your Garbage Can
Finding maggots in your garbage can is one of homeownership's least pleasant surprises, but it helps to understand what actually happened: a fly got into your cart, found food waste, and laid eggs — up to a few hundred at a time. In summer heat those eggs can hatch in as little as 8–12 hours. Maggots aren't a sign your can is uniquely dirty. They're a sign a fly had access and something to lay eggs on. Every fix below is about removing one of those two things.
Why Do Flies Target My Outdoor Trash Can?
Flies locate garbage by smell from a remarkable distance, and a wheeled cart full of food waste in warm weather broadcasts odor constantly — especially through the gap around a standard lid, which was never built to seal. Once a fly slips in (or lays eggs on residue around the rim), the cycle starts. The eggs hatch into maggots, the maggots feed, and within days you have the next generation of flies ready to repeat it.
How Do I Get Rid of Maggots Already in the Can?
Deal with the current infestation first.
- Bag and remove all trash from the cart, tying the infested bag shut immediately.
- Pour boiling water over the inside of the empty can — it kills maggots and eggs on contact. A kettle or two is enough for most carts.
- Scrub the walls, corners, and underside of the lid with hot water and dish soap. Eggs hide in the rim and lid hinge area, so don't skip them.
- Rinse and dry the can completely, ideally in full sun with the lid open.
Skip the bleach and pesticide sprays inside the can — boiling water and a real scrub do the job without chemical residue where your household trash sits.
What Habits Keep Flies From Laying Eggs in the First Place?
Bag everything, tie everything. Loose food waste is an open invitation. Double-bag meat scraps, fish, and pet waste in a small tied bag before they go into the main liner — these are the foods flies seek out first.
Rinse food containers. A quick rinse of meat trays, takeout boxes, and jars removes most of the residue flies (and future smell) feed on.
Keep the cart closed and dry. Flies are drawn to moisture as well as food. After rain, make sure water isn't sitting in the bottom of the cart or pooled on the lid. A dry, closed can is a far less attractive target.
Don't overfill. A cart stuffed so full the lid sits propped open is the number one cause of fly infestations. If the lid can't close flat, flies have a doorway. Split the load, or hold bulky items for the next pickup.
Move the can into shade. Heat accelerates the egg-to-maggot timeline. A cart stored in shade or in the garage gives eggs far less warmth to hatch in — though garage storage only works if the can is sealed well enough not to draw flies indoors.
Does Cleaning the Can Really Prevent Maggots?
Yes — residue is the food source. Even with perfect bagging, the occasional bag leaks, and that film of liquid in the bottom of the cart is enough to attract flies and feed larvae. A scrub every few weeks in fly season, plus a full dry afterward, removes the reason flies linger around your cart at all.
The Permanent Fix: A Lid Flies Can't Get Past
Every tip above reduces fly pressure, but they all share a weak point: the standard cart lid. It rests on the can — it doesn't seal it. Gaps at the rim let odor out (which calls flies in from down the street) and let flies themselves slip through.
The Trash Smell Buster cover closes that gap. It fits over the closed lid of your outdoor wheeled cart and stretches down over the top section of the can, with an elastic band that grips below the ridges molded around the top — a deep, snug, gap-free seal. Odor stays in, so flies aren't summoned, and the physical barrier means a fly that does show up can't reach the trash to lay eggs. The cover is durable, lemon-scented, chemical-free plastic — no sprays or poisons — and it's washable and reusable.
Sizes match standard US carts: 32 gallon (green), 45 gallon (brown), 64 gallon (black), and 95 gallon (blue). It's $18.99 at cleanertrashcan.com, with a free replacement if it doesn't fit, and it's also sold on Amazon, Walmart, and Etsy.
Break the cycle at the lid, and maggot season is over.