Boiling water is the fastest way to kill fly larvae in a trash can. It kills maggots on contact, requires no chemicals, and you can follow up with a thorough cleaning to prevent them from coming back. If you’re dealing with an active infestation, you have several effective options ranging from boiling water to bleach solutions to natural alternatives.
Why Maggots Appear So Quickly
A single housefly can lay up to 300 eggs at once, and those eggs hatch in roughly 24 hours during warm weather. From there, larvae grow rapidly over the next four to five days, feeding and increasing dramatically in size before crawling away to pupate. This entire cycle means a trash can that seems fine on Monday can be crawling with maggots by Wednesday. Warm temperatures, moisture, and the smell of decaying food are all it takes to attract egg-laying flies.
Empty the Can First
Before trying any treatment, get as much garbage out of the can as possible. If your regular pickup is coming soon, you can wait. Otherwise, bag everything up and take it to the dump or transfer it to another sealed container. Trying to treat maggots while they’re buried under bags of trash won’t work well since you need direct contact with the larvae for any method to be effective.
Boiling Water: The Fastest Kill
Boil a large pot or kettle of water and carefully pour it directly onto the maggots. This kills them instantly on contact. You may need several kettles’ worth depending on how large your trash can is and how widespread the infestation is. Once the water cools, scoop out the dead larvae and dispose of them in a sealed plastic bag. Then follow up by disinfecting the can.
Bleach Solution for Heavy Infestations
Mix one cup of bleach into one gallon of water and pour it into the trash can. Close the lid and let the solution sit for 30 minutes. This both kills the larvae and disinfects the bin. After 30 minutes, pour out the solution, rinse the can thoroughly with a hose, and let it air dry completely before putting a new bag in.
One critical safety note: never mix bleach with vinegar, ammonia, or other household cleaners. Bleach reacts with acids like vinegar to produce chlorine gas, which causes coughing, chest pain, breathing difficulties, and can be dangerous even in small amounts. Bleach mixed with ammonia produces chloramine gases with similar toxic effects. If you use bleach, use it only with water.
Vinegar and Dish Soap Solution
If you’d rather skip bleach entirely, mix equal parts white vinegar and water, then add a few drops of dish soap. Pour or spray the mixture directly onto the maggots, close the lid, and wait 30 minutes. The vinegar’s acidity kills the larvae while the dish soap helps the solution cling to them. Rinse the can afterward and let it dry.
For a deeper clean after the maggots are dealt with, mix one gallon of hot water with one cup of white vinegar and two tablespoons of dish soap. Scrub the entire interior of the trash can with this solution, paying attention to the bottom corners and the underside of the lid where organic residue tends to collect.
Diatomaceous Earth for a Non-Liquid Option
Food-grade diatomaceous earth works well when you want to avoid pouring liquids into your bin. Sprinkle it generously over the maggots and along the bottom of the can. The fine powder is made from fossilized organisms with microscopically sharp edges that cut into the larvae and dehydrate them. After several hours, sweep up the dead maggots and powder, seal them in a plastic bag, and clean the bin with a vinegar and water rinse.
This method is slower than boiling water or bleach but completely non-toxic, making it a good choice if you have pets or children who might come into contact with the can.
Cleaning and Drying the Can Properly
Killing the existing maggots is only half the job. If organic residue, moisture, or odor remains inside the can, flies will be back within days to lay another round of eggs. After you’ve dealt with the larvae, scrub the entire bin with hot soapy water or the vinegar cleaning solution. Rinse it with a hose and then let it air dry completely in the sun. Moisture left inside encourages bacteria and mold growth, both of which produce the smells that attract flies in the first place.
Preventing Maggots From Coming Back
The most effective prevention is keeping flies from accessing the contents of your bin. A tightly fitting lid is essential. If your trash can lid doesn’t seal well, placing fine mesh (1/16 inch or smaller) over any openings blocks 95% or more of flies from getting in to lay eggs. Even a small gap is enough for a fly to squeeze through and deposit hundreds of eggs.
Double-bagging food waste, especially meat, fish, and dairy, makes a significant difference. Flies are drawn to the volatile compounds that rotting protein gives off. If those smells can’t escape the bag, flies are far less likely to target your can. Freezing scraps of meat or fish until trash day is another practical option if your bin tends to sit in the heat for several days between pickups.
Moisture control also matters. Placing a layer of newspaper or cardboard at the bottom of the can absorbs leaking liquids that would otherwise pool and rot. Bamboo charcoal or activated carbon filters can reduce both moisture and odor inside the bin. Store your trash can in a shaded, well-ventilated spot rather than in direct sunlight, which heats the contents and accelerates decomposition.
Essential oils can serve as a mild fly deterrent between cleanings. Peppermint, eucalyptus, and cinnamon oil all produce scents that repel flies. You can mix a few drops into water in a spray bottle and mist the inside of the lid every couple of weeks, or soak a cloth in the solution and tie it around the can’s handle. These won’t stop a determined fly on their own, but combined with a sealed lid and good bagging habits, they reduce the chances of a repeat infestation considerably.