Maggots in Your Trash Can: How to Kill and Prevent Them

Maggots in your trash can are fly larvae, almost always from common houseflies that laid eggs on exposed food waste. They hatch within 24 hours of the eggs being laid, and in warm weather a single fly can deposit hundreds of eggs at once. The good news: they’re easy to kill and entirely preventable once you know what attracts them.

Why Maggots Show Up

Flies need three things to breed: food, moisture, and warmth. A trash can in summer provides all three. Meat scraps, dairy, pet food, and dirty diapers are the biggest attractors, but any decomposing organic material will do. Flies slip through gaps in the lid or land when you open the can, lay eggs directly on the waste, and the larvae emerge in as little as 8 to 20 hours. Within a few days, those tiny white worms can number in the hundreds.

Loose or torn trash bags make the problem worse because liquids pool at the bottom of the bin, creating a moist breeding ground that persists even after the bag is collected. If you’ve noticed maggots after trash pickup day, that residue at the bottom is likely the cause.

How to Kill Them Fast

Empty the trash can first. If your next pickup is days away, bag everything up and haul it to a dump or dumpster so you’re working with an empty bin. Then choose one of these methods:

  • Boiling water. Pour a full kettle directly over the maggots, making sure the hot water contacts each cluster. This kills them on contact. Once the water cools, scoop out the dead larvae, seal them in a plastic bag, and discard.
  • Vinegar and hot water. Mix one part white vinegar with three parts hot water, pour it into the trash can, and close the lid for 30 minutes. The combination kills the larvae and starts breaking down the residue they were feeding on. Drain, rinse, and repeat with a fresh vinegar solution to disinfect.
  • Bleach solution. Combine equal parts bleach and hot water, pour it in, and close the lid. The fumes alone will kill the maggots. A second wipe-down with undiluted bleach eliminates any remaining organic residue so the larvae have nothing to return to.
  • Salt. Pour a thick layer of salt directly over the maggots and the surrounding area. Salt dehydrates and kills them within hours. Sweep up the remains afterward and rinse the bin.
  • Diatomaceous earth. For a dry bin, spread an even layer of food-grade diatomaceous earth over the maggots. The fine powder damages their outer coating and dehydrates them. After several hours, sweep up the dead larvae and powder, seal them in a bag, and clean the bin with a vinegar solution or disinfecting spray.

All-purpose household cleaners and insecticide sprays also work if that’s what you have on hand, though they tend to be slower than boiling water or bleach.

Cleaning the Bin Afterward

Killing the visible maggots is only half the job. Fly eggs are tiny, pale, and easy to miss, so a thorough scrub prevents a second wave. After removing the dead larvae, spray the entire interior of the can with a hose. Use a long-handled brush with an all-purpose cleaner or a bleach solution and scrub the bottom, corners, and the underside of the lid, which is where eggs often cling.

Rinse everything thoroughly and let the bin dry completely in the sun before putting a new bag in. Sunlight and heat help kill any remaining eggs, and a dry bin is far less attractive to flies than a damp one. If the can still smells after cleaning, wipe the interior down with hot water and white vinegar. The acidity neutralizes odors that would otherwise draw flies right back.

Preventing Maggots From Coming Back

Prevention comes down to blocking flies from reaching your waste and making the bin less hospitable if they do get in.

Manage Food Waste Carefully

Double-bag meat scraps, fish, dairy, and pet waste in sealed bags before tossing them in the can. Tie your main trash bag tightly every time you take it out. Loose bags with open tops are an invitation. If you won’t have trash pickup for several days, freeze meat scraps in a bag in the freezer until the night before collection rather than letting them decompose in the heat.

Keep the Bin Dry

Moisture at the bottom of the can is the single biggest factor that sustains maggot colonies between pickups. After every collection day, check for pooled liquid and rinse it out. Sprinkling a layer of borax powder in the bottom of the empty bin absorbs moisture and masks food odors. Baking soda works similarly. Some people use a layer of dry coffee grounds on the bottom of the can for the same purpose: the acidity and strong scent help neutralize smells that attract flies.

Secure the Lid

A tight-fitting lid is your best physical barrier. If your bin’s lid warps or doesn’t close fully, replace it or use a bungee cord to hold it shut. Flies only need a tiny gap to enter and lay eggs.

Use Scent Deterrents

Several strong scents repel flies effectively. Peppermint essential oil is one of the most commonly used: add a few drops to a cotton ball and place it under the lid, or mix it with water in a spray bottle and mist the inside of the can after cleaning. Citronella oil, clove oil, and cinnamon oil all work similarly. Another approach is placing mothballs inside a tied-off piece of pantyhose and hanging it inside the lid. Flies and maggots avoid the smell, and it lasts for weeks. An ammonia spray (about two parts ammonia to one part water) applied to the bin’s interior also creates an environment flies want nothing to do with.

Are Maggots a Health Risk?

Maggots in an outdoor trash can are mostly a nuisance, not a direct health threat. They don’t bite or sting. The real concern is the flies they become. Houseflies pick up bacteria from rotting waste and spread it to surfaces in your home, including food and kitchen counters. In rare cases, fly larvae can infect open wounds or broken skin, causing a condition called myiasis, where the larvae burrow into tissue. This is uncommon in typical household settings but is a reason to handle infestations with gloves and wash your hands thoroughly afterward.

The bigger practical risk is that a maggot-filled bin attracts more flies, which lay more eggs, which creates a cycle that gets worse each week if left unaddressed. Dealing with it early, ideally the same day you notice larvae, keeps the problem small and the cleanup simple.

What to Do on an Ongoing Basis

A quick routine keeps maggots from ever returning. Rinse the bin with a hose after every trash collection. Once a month in warm weather, scrub the interior with a vinegar or bleach solution and let it dry in the sun. Sprinkle borax or baking soda in the bottom before putting in a fresh bag. Keep the lid tightly closed at all times, and refresh your scent deterrent of choice every couple of weeks. These five minutes of maintenance are far easier than dealing with another infestation.