PestControlLibrary
Menu
I found...

I found maggots in my trash can: what now?

Pale, wriggling maggots in a garbage can are fly larvae that hatched from eggs laid on food waste. They are a sign of loose, wet garbage that sat too long, and the fix is mostly cleaning and changing a few trash habits.[1][4][3]

The short answer

  • What they are: almost always the larvae of house flies or blow flies. UC IPM says blow flies most often breed in kitchen waste in towns, and that the two kinds of maggots look and behave so much alike that they are hard to tell apart.[1][2]
  • Why now: flies lay eggs on garbage, meat scraps and other moist rotting material, and in summer heat house flies and blow flies can go from egg to adult in as little as 7 days.[1][3][4]
  • Are they dangerous? The maggots don't bite. The concern is the adult flies they turn into: reviews of published studies found house flies carrying bacteria and other germs that can cause serious infections in people and animals.[10][11]
  • First steps: bag up and throw out the infested garbage, wash the can with soap and water, and from now on seal food waste in plastic bags and keep a tight lid on the can.[1][3][4]

Profiles on this site

What the maggots are

A maggot is the larval stage of a fly. Every fly goes through egg, larva, pupa and adult; the female lays eggs in feces, carrion or moist organic material, and the maggots feed there and grow through three larval stages.[1][4]

UC IPM says blow fly and house fly larvae are hard for the untrained to tell apart, and its advice for both is the same: remove what the larvae are growing in. Our house flies vs cluster flies vs blow flies page compares the adults.[1]

  • House fly maggots: cream colored, with a blunt rear end that tapers to a point at the head. UC IPM lists garbage among the warm, moist materials where house flies lay their eggs, in batches of about 100 to 150. University of Minnesota Extension gives batches of 75 to 100, usually laid in garbage.[1][3]
  • Blow fly maggots: creamy white, legless and cylindrical, tapering to a pointed head, according to Texas A&M AgriLife Extension. University of Minnesota Extension says blow flies lay eggs on garbage containing meat scraps, and the maggots often reach full size on the second or third day after hatching. The adults are shiny metallic green or blue flies.[2][3][1]
  • Soldier fly larvae: bigger, flattened, dark brown and tough-skinned, about 1 inch long. Oregon State University Extension says they turn up where flies can reach wet, rotting food or garbage, are common in compost bins, and won't harm you. Texas A&M says both the larva and the adult are harmless.[6][7][2]
  • Tiny flies and their larvae: Texas A&M lists the wet bottom of a trash can, where a plastic liner has leaked, as a fruit fly breeding spot, and drain flies can breed in the bottoms of garbage cans too. Our small flies indoors page covers those.[2]

Why they showed up

Garbage is ideal fly food. UC IPM says house flies lay eggs in warm, moist organic materials such as garbage and decaying fruits and vegetables, and that blow flies, though named for their link to dead animals, most often develop in human food waste in urban areas.[1]

Heat speeds everything up. Texas A&M says a house fly takes about 45 days to complete its life cycle at 60 °F but only 7 days at 95 °F. University of Minnesota Extension says blow fly maggots develop rapidly in warm weather and the whole blow fly life cycle usually takes 10 to 25 days.[2][3]

Loose food waste and slow pickup are the usual causes. UC IPM says garbage that sits for more than a week is likely to produce adult blow flies, and that many people have seen maggots crawl out of a backyard can in a mass after kitchen waste went in without being sealed in a plastic bag.[1]

Are maggots in the trash a health risk?

The risk comes from the flies. A systematic review of 99 studies found that house flies carry a large number of pathogens, mostly bacteria, that can cause serious infections in people and animals, often isolated from the flies' body surfaces. A second review and meta-analysis found houseflies carrying bacteria such as Escherichia coli and Klebsiella pneumoniae, including antibiotic-resistant strains, in both human and animal settings.[10][11]

NPIC notes that flies can spread disease when they touch garbage and feces and then land on food or food preparation areas, so keep them away from both.[4][10]

Maggots growing in a person's body tissue is a separate, uncommon problem called myiasis. CDC says people with untreated or open wounds are at higher risk, advises covering open wounds, and says anyone who thinks they have it should see a healthcare provider.[8]

Pets: the Merck Veterinary Manual says house flies, blow flies and bottle flies will lay eggs in infected skin wounds and in matted coats soiled with feces. If you see maggots in a sore or wound on your pet, don't try to remove them yourself; Merck says the wound cleaning and maggot removal need to be done by a veterinarian. Merck also notes that dogs and cats sometimes swallow maggots, which usually pass through undigested.[12]

How to clean maggots out of a trash can

Getting rid of what the maggots live in is what ends the problem. UC IPM says removing the larval habitat is the preferred way to manage pest flies, and that insecticides are not a substitute for sanitation. NPIC also says it is more effective to get rid of larvae than adult flies.[1][4]

  • Empty it: bag the garbage, maggots and all, tie the bag tightly and get it out for pickup. University of Minnesota Extension says to tie plastic garbage bags tightly to cut down odor.[3][1]
  • Wash it: UC IPM says garbage cans should be washed out regularly with soap and water to remove residues that attract blow flies or let them develop. Texas A&M says to check under liners in garbage containers and clean with soap and water where needed.[1][2]
  • Look for strays: maggots that are done feeding leave their food to find a drier, protected place to pupate, so check the ground around the can, the lid and the rim. Texas A&M says that left alone they will pupate in a crack or other protected spot and come out as adult flies.[1][2]
  • Deal with the adults: UC IPM says fly baits placed on the ground around trash containers may give some control of blow flies, and odor-baited cone traps work best away from the house where they aren't competing with nearby garbage. Neither replaces cleaning the can.[1]
  • About sprays: UC IPM says pesticides are usually not needed in home situations and that house flies are resistant to many registered insecticides. If you do use one, University of Minnesota Extension says to make sure the product is labeled for the site you plan to treat.[1][3]

Keeping them from coming back

The habits that stop maggots are the ones that keep flies from reaching the food waste in the first place.[1][4][5]

  • Bag wet waste: place household garbage and pet feces in plastic bags and seal them before they go into the outdoor can. Mississippi State University Extension gives the same advice for food waste so flies can't get to it.[1][5][4]
  • Tight lids: use cans with tight-fitting lids and keep them closed. University of Minnesota Extension adds that the cans should sit as far from the house as possible.[3][9][1]
  • Frequent pickup: UC IPM says to set the cans out at least once each week even if they aren't full. Orange County Mosquito and Vector Control District says to dispose of trash at least every seven days, and NPIC says to take trash out at least once or twice a week.[1][9][4]
  • Rinse before you toss: NPIC says to rinse cans, bottles and plastic containers before recycling or throwing them away.[4]
  • Keep the can clean: University of Minnesota Extension says to clean garbage cans regularly to remove food and odors.[3][1]
  • Yard sources: the same flies breed in dog droppings, dropped fruit and pet food left outside. Orange County Mosquito and Vector Control District says to pick up dog droppings daily and fallen fruit at least once a week.[9][3]
  • Compost: Oregon State says to bury kitchen waste in the pile and cover it with 2 to 4 inches of dry, absorbent material, and that soldier fly larvae can't survive above 113°F, so letting the pile heat up helps. Our compost pests guide has more.[6]

If the maggots are inside the house

Maggots on the floor or coming from a wall or ceiling usually mean something died nearby. Texas A&M says blow fly and flesh fly larvae in a home usually indicate that a bird, squirrel, rat or similar animal has died somewhere in the structure, and University of Minnesota Extension says the maggots leave the carcass to pupate and can drop through gaps in walls or ceilings.[2][3]

This passes on its own once the food is gone. Minnesota says it may take up to a week for a small animal such as a squirrel. Texas A&M says adult flies usually show up 1 to 2 weeks after the maggots and may keep emerging for 1 to 3 weeks before they disappear.[3][2]

Remove the carcass if you can reach it. Texas A&M says that when it can't be found or reached, destroying the maggots and swatting the adult flies is usually the only practical response, and that the house should then be checked and sealed against the birds or mammals that got in.[2]

Check the kitchen too. Texas A&M's list for indoor fly sources includes cleaning up spilled or spoiled food and checking under liners in garbage containers.[2]

When to call for help

A clean, covered can and weekly pickup handle most trash-can maggots without outside help. University of Minnesota Extension says hiring a licensed pest control operator may be the best approach for heavy fly infestations, and that some insecticides are only available to them. UC IPM says a professional can apply residual insecticides to outdoor surfaces where flies rest.[3][1]

For maggots or blow flies coming from inside a wall, attic or chimney, Texas A&M says the house needs to be inspected for openings where birds or mammals got in, and those openings sealed with sturdy wire, sheet metal or other pest-resistant material, with a cap on the chimney.[2]

Common questions

Will boiling water or bleach kill maggots in a trash can?
None of our sources recommends it for trash cans. What UC IPM and University of Minnesota Extension recommend is bagging the garbage, removing it, and washing the can out with soap and water.[1][3]
How did maggots get in a closed trash can?
Flies lay eggs on any food waste they can reach. UC IPM ties maggots crawling out of backyard cans to kitchen waste that wasn't sealed in a plastic bag, and University of Minnesota Extension says to use cans with tight-fitting lids.[1][3]
Are the big brown maggots in my compost harmful?
Those are usually soldier fly larvae. Oregon State University Extension says they won't harm you or the compost and help break it down.[6][7]
How long until maggots turn into flies?
In summer heat it can be quick. UC IPM and NPIC say house flies can go from egg to adult in as little as 7 days, and University of Minnesota Extension gives 10 to 25 days for the whole blow fly life cycle.[1][4][3]

Photo credits

Sources

  1. University of California Statewide IPM Program, “Pest Notes: Flies.” ipm.ucanr.edu/home-and-landscape/flies/ (accessed 2026-11-14)
  2. Texas A&M AgriLife Extension, “Indoor Flies and Their Control.” agrilifeextension.tamu.edu/library/insects/indoor-flies-and-their-control/ (accessed 2026-11-14)
  3. University of Minnesota Extension, “Flies.” extension.umn.edu/garden-and-home/home-maintenance/household-insects/flies (accessed 2026-11-14)
  4. National Pesticide Information Center, “Flies.” www.npic.orst.edu/pest/flies.html (accessed 2026-11-14)
  5. Mississippi State University Extension, “How to Control Flies in Your Home.” extension.msstate.edu/blogs/extension-for-real-life/how-control-flies-your-home (accessed 2026-11-14)
  6. Oregon State University Extension Service, “Soldier fly larvae: Beneficial compost helpers.” extension.oregonstate.edu/news/soldier-fly-larvae-beneficial-compost-helpers (accessed 2026-11-14)
  7. Texas A&M AgriLife Extension, Urban Entomology, “Soldier flies (ENT-2005).” citybugs.tamu.edu/factsheets/household/flies-house/ent-2005/ (accessed 2026-11-14)
  8. U.S. Centers for Disease Control and Prevention, “About Myiasis.” www.cdc.gov/myiasis/about/index.html (accessed 2026-11-14)
  9. Orange County Mosquito and Vector Control District, “How to avoid a fly infestation.” ocvector.specialdistrict.org/how-to-avoid-a-fly-infestation-086eaf3 (accessed 2026-11-14)
  10. Khamesipour F, et al., “A systematic review of human pathogens carried by the housefly (Musca domestica L.). BMC Public Health 2018;18:1049.” pubmed.ncbi.nlm.nih.gov/30134910/ (accessed 2026-11-14)
  11. Monyama MC, et al., “Bacterial pathogens identified from houseflies in different human and animal settings: A systematic review and meta-analysis. Vet Med Sci 2022;8(2):827-844.” pubmed.ncbi.nlm.nih.gov/33955703/ (accessed 2026-11-14)
  12. Merck Veterinary Manual, “Flies and Mosquitoes of Dogs.” www.merckvetmanual.com/dog-owners/skin-disorders-of-dogs/flies-and-mosquitoes-of-dogs (accessed 2026-11-14)

Updated 2026-11-14. Built from sourced records. Spot an error? Tell us.