Skip to main content
All blogs

Budget & Planning

How to Get Rid of Maggots in a Trash Can (and Keep Them Gone)

Strategic Sanitation Services

Maggots in a trash can are fly larvae, and they mean flies have already laid eggs on food waste inside the can. Virginia Cooperative Extension says house fly maggots show up in garbage cans left uncovered and not emptied regularly, and that maggots in garbage cans can be killed with boiling water. Killing the maggots is the quick part. Keeping them from coming back means taking away the warm, moist food scraps and residue they live on.

This guide covers how to get rid of maggots in a trash can, how to clean the bin afterward, and how apartment, condo and HOA communities keep maggots out of shared trash bins and dumpsters.

Why Maggots in Trash Cans Show Up

According to the University of California Statewide IPM Program, female flies lay eggs in moist organic material, where the larvae, commonly called maggots, finish developing. Under good summer conditions, flies can go from egg to adult in as little as seven days, and a female can lay several batches of eggs, typically with over 100 eggs each. That is why a trash can can look clean on Monday and be full of maggots by the weekend.

The usual causes are simple:

  • Food waste in loose or torn trash bags. Meat and food scraps are what attracts flies in the first place.
  • A lid that does not close. Adult flies need only a small gap to reach the garbage.
  • Residue at the bottom of the bin. Liquids and grime left after emptying give eggs a place to hatch.
  • Heat. Warm weather speeds up how fast eggs hatch and larvae grow, so maggots are worst in summer.
  • Long gaps between emptying. The longer garbage sits before it is collected, the more time flies have.
  • Liquids in the bin. Keep liquids out of the trash can. A wet layer at the bottom creates the moist conditions maggots need.

How to Get Rid of Maggots in Trash Can: Step by Step

Wear rubber gloves and avoid touching maggots or garbage with bare hands. Then work through these steps.

1. Bag and remove the garbage

Tie the trash bags tightly and take them out of the trash can. If the bin is an outdoor cart, set the bags in another sealed container until collection. Scrape out any loose food scraps stuck to the bottom of the bin.

2. Kill the maggots with boiling water

Pour boiling water slowly into the empty trash can. This is the key step to kill maggots in the bin. Virginia Cooperative Extension names boiling water as a simple, organic way to kill maggots in garbage cans. Hot water is scalding, so keep children and pets away and pour with care. Do not pour boiling water into a plastic bin unless it is heat-safe. Let the water sit for a few minutes, then pour it out where the runoff will not reach a storm drain.

3. Scrub, rinse and dry completely

Scrub the inside, bottom, rim and lid with soap, water and a long-handled brush to remove eggs, larvae and grime. NC State Extension suggests rinsing garbage bins with bleach to kill remaining eggs, larvae and pupae if fly activity continues in closed bins. Follow the product label and never mix bleach with other cleaners. Rinse with a hose, then let the bin dry completely in the sun for a few hours before adding a new bag, because moisture is what maggots need.

What about salt, vinegar and sprays?

Salt, distilled white vinegar and store-bought sprays are often shared as home remedies, such as a solution of vinegar and hot water or a layer of salt sprinkled in the bottom of the bin to absorb moisture. The extension sources in this guide do not rely on them. They point to boiling water, cleaning and removing the food source. UC IPM says insecticides are not a substitute for sanitation and should be a last resort for adult flies, because house flies have developed resistance to many pesticides. If you choose a spray, follow the label, and call a licensed pest control professional for a serious infestation.

How to Keep Maggots Out and Prevent Flies

Once the bin is clean, prevention is about regular cleaning and routine:

  • Seal food waste. Put food scraps in tied trash bags before they go in the bin, and double-bag meat scraps. NC State Extension says tying bags tightly and keeping bins closed stops most flies from reaching food.
  • Keep the lid closed. Replace a cracked or missing lid.
  • Empty the bin often. The National Pesticide Information Center (NPIC) recommends taking trash out at least once or twice a week.
  • Rinse containers before you toss them. NPIC also suggests rinsing cans, bottles and plastic containers before throwing them away or recycling them.
  • Clean the bin regularly. A bin that gets rinsed and dried on a schedule never builds the residue maggots feed on.
  • Keep bins away from doors. UC IPM says garbage cans should be placed at some distance from building entrances, and NPIC says outdoor dumpsters should be at least 50 feet from kitchen doors and windows.

Indoor and outdoor bins need the same care, whether the bin sits in a kitchen, a garage or the yard. A small kitchen bin with food waste can hold maggots too, so empty it often and wash it, even if it is not full.

Maggots in Dumpsters and Community Trash Bins

For an apartment, condo or HOA community, the problem is bigger than one trash can. Dozens of households share the same trash bins, totes and dumpsters, so one leaking bag can create a mess that affects the whole enclosure. Maggots in a shared container are a sign that food waste and moisture are sitting too long, not that residents are doing anything unusual.

What works at community scale:

  • Clean the containers, not only the floor. Residue stays in a tote after the hauler empties it. Strategic Sanitation's Tote Cleaning pressure washes organic waste and everyday totes to remove grime, debris and odor-causing buildup from the container itself.
  • Pair cleaning with fly control. Tote Support combines tote pressure washing and fly control for totes, and it is included on Silver and Gold plans for garden and podium communities.
  • Wash the enclosure or trash room. Spills on the floor and walls feed flies too. Enclosure Pressure Washing is quarterly on Silver and monthly on Gold for garden communities, and podium communities get Trash Room Pressure Washing on the same schedule.
  • Keep the area tidy between washes. On-site Waste Control tidies, cleans and sweeps trash rooms and enclosures and reports bin contamination and broken equipment.

Strategic is not the trash hauler. The hauler still empties the containers. If maggots return because trash sits too long between pickups, compare the pickup schedule with how fast the bins fill and raise it with your hauler.

Are Maggots Dangerous?

If you are concerned about health, the bigger issue is the flies. Maggots themselves do not bite or eat people, but the flies they turn into can spread germs. UC IPM says flies breed in food waste and decaying organic material, where they can pick up bacteria and viruses that may cause human disease. Heat speeds all of this up, and odors from the same residue attract more flies. That makes a maggot infestation a sanitation issue for residents and staff, not only an unpleasant sight. For more on adult flies, read how to keep flies out of trash cans.

A Quick Checklist

  • Bag and remove all garbage.
  • Pour boiling water into the empty bin, carefully.
  • Scrub the bottom, rim and lid with soap and water.
  • Rinse and let the bin dry completely in the sun.
  • Keep lids closed and bags tied.
  • Empty the bin at least once or twice a week.
  • Clean bins on a regular schedule, more often in hot weather.

Get Help From Strategic Sanitation

Strategic Sanitation Services works with apartment, condo and HOA communities in Orange County, San Diego County, Los Angeles County and Riverside County. This is a service for communities, not individual households. Call 877.271.7909 or see all services to find the right plan. New communities can try Strategic free for 30 days: if you love it, stay. If you don't, leave it.

Common Questions

How do you get rid of maggots in a trash can fast?

Remove and bag the garbage, then pour boiling water into the empty can. Virginia Cooperative Extension says boiling water kills maggots in garbage cans. Scrub the can with soap and water, rinse it and let it dry completely.

What causes maggots in a trash can?

Flies lay eggs on food waste and moist residue in the can. Loose food scraps, an open lid, warm weather and long gaps between emptying make it more likely.

How do I keep maggots out of my outside trash can?

Tie trash bags tightly, keep the lid closed, take trash out at least once or twice a week, and clean and dry the bin regularly so no residue is left for flies.

Does bleach kill maggots?

NC State Extension suggests rinsing garbage bins with bleach to kill remaining eggs, larvae and pupae. Follow the label and never mix bleach with other cleaners.

Does Strategic Sanitation clean trash bins for communities?

Yes. Tote Cleaning pressure washes organic waste and everyday totes for apartment and HOA communities, and Tote Support adds fly control on Silver and Gold plans. Strategic does not clean bins for individual homes.

Sources

Back to all blogs

You Have Enough on Your Plate. Trash Problems Shouldn't Be One of Them

Start Your Free Month