How to Keep Maggots, Flies and Odor Out of Outdoor Trash Cans
by Outdoorsiness on Nov 30 2026
Short answer: maggots come from flies laying eggs on food waste they can reach. To keep them out of an outdoor trash can, stop flies getting to the waste and empty the can before eggs can develop. That means a covered lid with a self-closing door, a bag inside the liner, emptying at least weekly (twice a week in hot weather), and rinsing the liner so no residue is left behind. Below is how to do each one, plus how to clean out maggots and odor you already have.
Why outdoor trash cans get maggots
Maggots are fly larvae. House flies and blow flies lay eggs on rotting food, meat scraps and other moist waste, and a trash can in the sun is an ideal spot. The timeline is short: house fly eggs hatch in about 8 to 20 hours, the larvae feed for 4 to 7 days, and in warm summer weather the whole cycle from egg to adult can finish in 7 to 10 days. That's why a can emptied once a week in July can still be crawling with maggots by pickup day.
Three things set it up:
- Open access. Flat tops and open receptacles let flies land right on the waste.
- Loose food waste and liquid. Unbagged scraps and leaked liquid in the bottom of the liner give larvae food and moisture.
- Time and heat. The longer waste sits, especially in the sun, the more time eggs have to hatch and develop.
How to keep maggots and flies out of a trash can
1. Use a covered lid with a self-closing door
The lid matters more than anything else. A dome lid covers the top of the can and has a spring-loaded door that swings shut after each use, so flies can't reach the waste between users. It's the lid we recommend first to customers dealing with flies and maggots. A rain bonnet lid also covers the top but leaves the side openings open. A flat top lid is the easiest to use but leaves the waste most exposed.
Our commercial plastic dome lid fits most of our 32, 36 and 45 gallon receptacles, so you can upgrade an existing can without replacing it. It also comes on complete cans like the 36 gallon diamond steel can with dome lid and the 55 gallon punched steel can with dome lid.
2. Bag everything, inside a rigid liner
Run a plastic bag inside the can's rigid liner and tie it off when you empty it. Bagged waste keeps food scraps and liquid off the liner walls, so there's nothing left behind for flies once the bag is gone. If your receptacle doesn't have a liner, add one: our 32 gallon and 36 gallon plastic liners are solid, with no drain holes.
Tip from our team: drill a few small holes in the bottom of a solid liner. Rainwater drains out instead of pooling, and the holes break the suction that makes full bags hard to pull out.
3. Empty it before eggs can develop
Collect trash at least once a week, and twice a week in hot weather. Because the fly life cycle can finish in about a week in summer, a twice-weekly pickup removes eggs and young larvae before they mature. Empty cans even when they aren't full, and add extra pickups at busy times like holiday weekends at a campground or pool.
4. Rinse the liner regularly
Even bagged cans collect drips and residue in the bottom of the liner. Pull the liner, rinse it with soapy water or a mild bleach-and-water solution, let it dry, and reinstall it. In summer, rinse on a regular schedule rather than waiting for a smell.
5. Keep the area around the can clean
- Pick up spilled food, bags that missed the can and overflow on the ground.
- Don't let cans overfill. Add a second receptacle where one keeps filling up.
- Where you can, place cans out of full afternoon sun, which speeds up rotting and odor.
How to get rid of maggots already in a trash can
- Bag and remove the waste. Tie it off tightly and take it to a dumpster or collection point.
- Kill the remaining maggots. Pour boiling water into the empty liner, or spray a bleach-and-water solution, and let it sit for a few minutes.
- Scrub the liner. Use a brush and soapy water to remove all residue, including under the rim.
- Rinse and dry fully. Leave the liner upside down in the sun so no moisture is left.
- Fix the cause. Add a bag, swap to a dome lid, or increase pickups so it doesn't happen again.
How to get the smell out of an outdoor trash can
Odor comes from residue and liquid in the liner, not the can itself. Clean the liner as above, then:
- Sprinkle baking soda in the bottom of the dry liner before putting a new bag in.
- If you've drilled drain holes in the liner, keep them clear so liquid doesn't sit and sour.
- Check the area under and around the can for spills that soak into the ground.
Which trash can works best for fly control?
For parks, campgrounds, HOAs and commercial properties, look for:
- A dome lid with a self-closing door.
- A removable rigid liner that's easy to pull, rinse and drain.
- A sturdy steel or recycled plastic body that won't crack or rust through and trap moisture.
- The right size for your pickup schedule. A bigger can isn't better if waste sits for two weeks.
For sizes, materials and lid styles, see our commercial outdoor trash receptacle guide.
FAQ
How do I keep maggots out of my outdoor trash can?
Use a covered lid with a self-closing door, bag all waste inside a rigid liner, empty the can at least weekly (twice a week in summer) and rinse the liner regularly.
How fast do maggots appear in a trash can?
House fly eggs can hatch in about 8 to 20 hours, so maggots can appear within a day of flies reaching the waste.
What kills maggots in a trash can?
Boiling water or a bleach-and-water solution poured into the empty liner, followed by scrubbing and drying.
What lid keeps flies out of a trash can?
A dome lid with a spring-loaded, self-closing door. It covers the top and closes after every use, so flies can't reach the waste between users.
Should trash can liners have drain holes?
Our plastic liners are solid. We recommend drilling a few small holes in the bottom so rainwater drains and bags pull out more easily.
Share
