Maggots in the Trash Can: Why They Appear and How to Stop Them

By the Pest Control Brief editorial team Updated October 11, 2026 13 min read
Wheeled garbage bins beside a garage in summer
Quick answer

Maggots in a trash can are the larvae of house flies or blow flies that laid eggs on food or pet waste that was not sealed in a bag. In warm weather house fly eggs hatch in 8 to 20 hours, so a can can hold live maggots within a day. Pour boiling water over them, scoop the remains into a sealed bag, wash the can with soap and water and let it dry in the sun. Then bag every food scrap, keep the lid shut and never let waste sit more than a week; no insecticide is needed.

Finding maggots under the lid is common in summer and says more about timing than housekeeping. The usual weekly collection is almost exactly the length of a summer fly generation, which is why the problem repeats.

How fast trash turns into maggots, and then into flies

UC IPM notes that blow fly and house fly larvae look and behave so alike that identification is difficult for the untrained, so the table compares both, using University of Florida Featured Creatures figures.

Stage House fly Green bottle fly (a blow fly)
Egg to hatching 8 to 20 hours in warm weather About 18 hours at 81°F, 21 hours at 70°F
Maggot feeding 4 to 13 days at optimal temperatures; 14 to 30 days at 54 to 63°F About 3 days at 81°F, 4 days at 68°F
Pupa (the brown, rice-like case) 2 to 6 days at 90 to 99°F; 17 to 27 days near 57°F About 7 days at 81°F, 10 days at 70°F
Egg to adult fly As little as 7 to 10 days in summer; up to two months in poor conditions About 11 days at 81°F (the stages added together)
Full-grown maggot 7 to 12 mm (about 1/4 to 1/2 inch) 12 to 18 mm (about 1/2 to 3/4 inch)
Eggs laid Batches of 75 to 150, up to 500 per female Clusters of up to 200 at a time

Eggs become maggots in less than a day once the weather is warm, and University of Florida notes that several flies often lay in the same spot, which is why you rarely find a few maggots: you find hundreds.

Green bottle fly: egg to adult at 68 to 81°FEggs on unbagged scraps hatch in less than a day, maggots are full grown and wandering within about four days, and adults can emerge before the second weekly collection. Shorter bars are the warmer end of the range.Egg18 to 21 hoursHatches in about 18 to 21 hoursMaggot (feeding)3 to 4 daysFull grown in 3 days at 81°F, 4 days at 68°FPupa7 to 10 days7 days at 81°F, 10 days at 70°F0246810All stages together: 11 to 15 days
Green bottle fly: egg to adult at 68 to 81°F Eggs on unbagged scraps hatch in less than a day, maggots are full grown and wandering within about four days, and adults can emerge before the second weekly collection. Shorter bars are the warmer end of the range. Source: University of Florida IFAS Extension EENY-502 (Lucilia sericata), citing Anderson 2000.
Garbage bin on its side being rinsed with a hose
Rinsing the bin removes the residue flies lay their eggs in. Illustration for The Pest Control Brief.

Why there are maggots in your trash can

Flies lay eggs on warm, moist, decaying material. UC IPM lists garbage, lawn clippings, decaying fruit and vegetables and animal waste for house flies, and says that in towns the most common breeding site for blow flies is human food waste, with accumulations of pet waste also producing them. A trash can in the sun holds all of that in one warm, humid box.

The flies need access only briefly: an overfull can with the lid ajar, a split bag or an unsealed bag of dog waste is enough. University of Florida notes that house fly eggs must stay moist or they will not hatch, so liquid pooling at the bottom of the can matters as much as the scraps themselves.

Which fly it is

The fix is the same either way. Large, shiny metallic green or blue flies are blow flies; smaller grey flies with four dark stripes on the thorax are house flies. Our guide to how long flies live covers the adults in more detail.

Fly eggs, maggots and pupae found in trash cansBlow fly maggots grow noticeably larger than house fly maggots, but at any given age the two look and behave alike. The brown pupae left in seams and under the can are 8 to 10 mm long.House fly egg1.2 mmGreen bottle fly egg1.5 mmHouse fly maggot, full grown7 to 12 mmGreen bottle maggot, full grown12 to 18 mmHouse fly pupa8 mmGreen bottle fly pupa9 to 10 mm02.557.51012.51517.5mm
Fly eggs, maggots and pupae found in trash cans Blow fly maggots grow noticeably larger than house fly maggots, but at any given age the two look and behave alike. The brown pupae left in seams and under the can are 8 to 10 mm long. Source: University of Florida Featured Creatures EENY-48 (house fly) and EENY-502 (green bottle fly).

The seven-day gap: why weekly pickup does not always break the cycle

This is the part most advice leaves out. In summer, a house fly can go from egg to adult in as little as 7 to 10 days, and UC IPM gives as little as 7 days for both house flies and blow flies under ideal temperatures. Weekly collection is therefore roughly one fly generation long. Here is how a typical summer week plays out when scraps go into the can unbagged:

Day What happens in the can
Day 0 A fly lays a batch of eggs on loose food waste the evening after collection.
Day 1 Eggs have hatched; small maggots burrow into the waste, away from light.
Days 2 to 4 Maggots feed and grow; a blow fly maggot can be full grown in about 3 days at 81°F.
Days 4 to 6 Older maggots leave the food and crawl towards drier, cooler places: up the walls, under the lid rim, out of the drain hole and onto the ground.
Day 7 Collection removes the waste, but maggots and pupae tucked into the can’s seams, hinges and the soil underneath stay behind.
Days 7 to 12 New flies emerge beside the can, ready to lay eggs in the next week’s trash.

The wandering stage is real and documented. UC IPM writes that older house fly larvae become attracted to light and leave their food to find drier, cooler areas to pupate, and that many homeowners have seen a mass emergence of maggots crawling from backyard trash cans when kitchen waste was not sealed in a plastic bag.

The timing table is our reading of the published development times; real cans vary with shade and temperature. The conclusion matches extension advice: UC IPM says garbage cans should go out for pickup at least once a week even if they are not full, because garbage that sits for more than a week is likely to produce adult blow flies. Where food scraps or organics are collected every two weeks, as Honolulu does with its green carts, a whole generation fits between collections, which is why the city tells residents to freeze food scraps and put them out the night before or the morning of collection day.

How to get rid of maggots in a trash can

  1. Bag and remove the waste. Seal everything, including dead maggots, in a fresh bag and tie it. If collection is days away, double bag it and keep it in a closed container out of the sun.
  2. Kill what is left with boiling water. Pour it slowly down the inside walls and into the seams and wheel wells. Heat kills the maggots it touches, with no residue. Take care with splashes, and keep children and pets away.
  3. Wash the can. UC IPM’s advice is to wash garbage cans regularly with soap and water to remove residues that attract blow flies or let them develop. Scrub the bottom, the hinge, the lid rim and the drain plug, then rinse with a hose.
  4. Check underneath. Look at the ground where the can stands. Maggots that escaped often pupate there as small brown capsules; sweep or hose them up.
  5. Dry it. Tip the can upside down in the sun. House fly eggs that dry out do not hatch, so a dry can gives the next batch a poorer start.
  6. Disinfect if you want to. If you use bleach, follow CDC’s household recipe of 5 tablespoons (1/3 cup) of bleach per gallon of room temperature water, leave it wet for at least a minute, then rinse.

Salt and vinegar are widely recommended online, but we found no extension testing of either for maggots. Washing and drying the can matters more than the kill method, because residue left behind feeds the next batch.

Bleach: useful, with two cautions

Some guides tell readers to pour equal parts bleach and hot water into the can, or to wipe it with undiluted bleach. That is far stronger than needed. CDC’s disinfecting recipe is about 1/3 cup per gallon, made with room temperature water, and CDC is explicit: never mix household bleach with any other cleaners or disinfectants, because this can release vapours that may be very dangerous to breathe. That includes ammonia, and it includes the vinegar some guides suggest for the same wash. Use one or the other, rinse between them, and work outdoors.

What not to do

  • Mothballs. One widely shared guide suggests hanging mothballs in the can. Mothballs are pesticides, and the National Pesticide Information Center notes that their labels direct use in a tightly closed container and that using them outdoors can harm children, pets and other animals. Using a pesticide in a way its label does not allow is a violation of federal law; our guide to reading a pesticide label explains why.
  • Bug spray in the can. UC IPM says that in most home situations pesticides are not needed or recommended for house flies, and that flies are resistant to many registered insecticides. The maggots die with boiling water and the source goes with the bag.
  • Waiting it out. Maggots do leave, but only to turn into flies nearby.

How to keep maggots out of the trash can

  • Bag every food scrap and seal it. UC IPM advises placing household garbage and pet faeces in plastic bags and sealing them before they go into outdoor containers. It is the most useful single step.
  • Freeze the worst offenders. Meat trimmings, fish skin, bones and shellfish can go in a bag in the freezer until the night before collection, which is the same approach Honolulu recommends for food scraps.
  • Keep the lid shut, always. An overfull can with the lid propped open is an open invitation. UC IPM and University of Florida both call for containers with tight-fitting lids.
  • Put it out every week, full or not. This is UC IPM’s specific advice for blow flies.
  • Keep the can in shade, away from doors. UC IPM advises placing garbage as far from building entrances as practical.

Organics carts often refuse plastic bags, so check local rules; freezing scraps until collection day is the usual workaround.

Trash attracts more than flies. Our analysis of trash and rat complaints looks at how garbage handling relates to rodent problems at neighbourhood scale.

Maggots in the kitchen bin, or flies indoors

An indoor bin follows the same timeline. Empty it every day or two in summer and keep meat scraps out of it. If small worms turn up somewhere other than the bin, such as a drain or the pantry, they are probably not fly maggots at all; our guide to little worms in the house sorts them by where you found them. Tiny flies hovering around the bin are more often fruit flies or drain flies, which breed in different places and are covered in fruit flies, drain flies and gnats.

If large numbers of flies appear indoors with no obvious bin source, a dead animal in a wall or attic is a common cause, explained in flies in the house all of a sudden.

When flies peak: what iNaturalist records show

We looked at when Americans record these flies, using iNaturalist research-grade observations and adjusting for how many people are out recording anything in each month. A value of 100 is the fly’s average share of all records; 200 means twice its usual share.

When house flies and blow flies are recorded, by monthIndex of each fly's share of all US iNaturalist research-grade records that month (yearly mean = 100). Blow flies run above average from June to November and peak in September; house fly sightings climb into October and November, likely because they are noticed around buildings as other insects fade.JFMAMJJASONDHouse flypeaks in NovemberBlow fliespeaks in September
When house flies and blow flies are recorded, by month Index of each fly's share of all US iNaturalist research-grade records that month (yearly mean = 100). Blow flies run above average from June to November and peak in September; house fly sightings climb into October and November, likely because they are noticed around buildings as other insects fade. Source: The Pest Control Brief analysis of iNaturalist research-grade records, pulled October 2026.

Blow flies sit above their average from June to November, peaking in September (161) and October (160) before dropping to 55 in December and 33 in January. House flies climb later and further, from 73 in June to 200 in October and 225 in November. That late surge probably reflects house flies being noticed around and inside buildings as other insects disappear, rather than more breeding, so read it as a sightings pattern. Blow flies were recorded about 13 times as often as house flies (23,512 records against 1,752), which reflects how conspicuous the metallic flies are, not proof they outnumber house flies. For trash cans, the risk season runs well past midsummer: keep bagging and rinsing through October.

When to call a professional

A trash can infestation is almost always a do-it-yourself job. Consider professional help if flies keep breeding after weeks of bagging and washing, which suggests a source elsewhere such as a dead animal or compost heap, or if you run a food business, where inspectors treat flies as a sanitation finding; our analysis of restaurant fly violations shows how often they are cited.

Frequently asked questions

Is it normal to have maggots in your garbage can?

Yes, especially in summer. UC IPM notes that many homeowners have seen maggots crawling from backyard trash cans when kitchen waste was not sealed in a plastic bag. Blow flies and house flies breed in food and pet waste, and a can in the sun is warm and humid. It reflects timing and access, not a dirty home. Sealing scraps in bags and keeping the lid shut is the main prevention.

How long does it take for maggots to form on trash?

Less than a day in warm weather. University of Florida gives 8 to 20 hours for house fly eggs to hatch in warm conditions, and about 18 hours at 81°F for green bottle fly eggs, rising to about 21 hours at 70°F. The maggots then feed for roughly 3 to 13 days depending on species and temperature before leaving to pupate, and adults can emerge as little as 7 days after the eggs were laid.

What kills maggots instantly in the trash can?

Boiling water poured slowly over them and into the seams of the can kills the maggots it reaches, with no chemical residue. Afterwards, bag the remains, wash the can with soap and water as UC IPM advises, and dry it in the sun. If you also disinfect with bleach, use CDC’s dilution of about 1/3 cup per gallon of room temperature water and never mix it with ammonia, vinegar or other cleaners.

Will my bin still get emptied if there are maggots?

Usually, yes. Maggots themselves rarely feature in collection rules; open lids and loose trash do. Manteca, California, for example, tells residents that trash should be bagged and lids closed because uncontained trash ends up on the ground. Bag everything, including any maggots, close the lid, and check your own hauler’s rules. Afterwards, rinse the empty can and let it dry before the next week’s trash goes in.

Are maggots in the trash can dangerous?

Not usually to touch, but the adult flies they become can carry bacteria from garbage to food; UC IPM and University of Florida both describe flies as possible carriers of disease organisms. CDC describes myiasis, maggot infection of human tissue, as uncommon in the United States and linked mainly to open wounds and travel to tropical regions. If you have a wound concern, see a doctor. Our New World screwworm guide covers the livestock pest in the news.

Sources

  • University of California Statewide IPM Program, Pest Notes: Flies, UC ANR Publication 7457 (A. C. Gerry).
  • University of Florida, Featured Creatures EENY-48: House fly, Musca domestica (Sanchez-Arroyo and Capinera), revised 2017.
  • University of Florida IFAS Extension, EENY-502: Common green bottle fly, Lucilia sericata (Anderson and Kaufman), 2011.
  • Centers for Disease Control and Prevention, Cleaning and Disinfecting with Bleach.
  • Centers for Disease Control and Prevention, About Myiasis.
  • National Pesticide Information Center (Oregon State University and US EPA), Mothballs: regulation and label use.
  • City of Manteca, California, Trash Not Picked Up.
  • Honolulu Star-Advertiser, Kokua Line, City guidance on maggots in green carts, July 2026.
  • The Pest Control Brief analysis of iNaturalist research-grade records, pulled October 2026.
Got flies or pantry pests?Compare local quotes