How to Get Rid of Maggots in a Trash Can: 6 Safe Ways

Remove maggots safely, clean the bin without mixing chemicals, and reduce repeat infestations with practical steps for indoor and outdoor trash cans year-round.

By · Reviewed by LeafyPixels Review Board · Published · Updated · 15 min read

Closed outdoor garbage carts beside a house

Maggots in a trash can are unpleasant, but they usually point to a specific, fixable source: fly eggs were laid on damp, decaying waste. The safest cleanup starts by sealing and removing that waste, then clearing larvae and residue from the empty can. You do not need to start by pouring bleach into the bin or spraying a pesticide through the kitchen.

The right next step depends on where the can is, what it is made of, and whether you can safely move it. A small indoor bin can be emptied into an outdoor refuse cart; a large wheeled cart may need to be cleaned in place. The six actions below separate larval removal from ordinary washing, optional disinfection, and the prevention steps that stop another batch.

Why maggots show up in trash cans

What maggots are and where they start

“Maggot” is the common term for the larval stage of a fly. Female flies lay eggs on suitable food or organic waste; the eggs hatch, and the larvae feed where they emerged. Household trash with wet food residue, meat or fish scraps, leaking packaging, or a torn bag can provide that breeding material. In warm weather, development can move quickly, so waiting for the next scheduled can wash may allow larvae to become large and mobile. (University of Minnesota Extension; PestWorld)

A bin does not create maggots on its own, and a clean, dry container is not their food source. The key is usually a fly getting access to something wet or decaying inside the can—through an open lid, damaged bag, or food residue left around the rim or bottom. Outdoor carts can also attract flies when an old spill remains after collection. University of California’s IPM guidance identifies food waste and other decaying organic material as breeding sites and recommends sanitation and washing garbage cans to remove residues. Under optimal summer conditions, some common flies can complete the egg-to-adult cycle in about seven days; that is a best-case biological timeline, not a promise that every bin infestation develops on that schedule. (UC Statewide IPM Program)

Why larvae may be crawling out of the can

A maggot moving along the lid, outside wall, garage floor, or nearby siding may be leaving the food rather than looking for more of it. When fly larvae finish feeding, many move toward a dry, sheltered place to pupate; this is why people sometimes find them crawling away from a trash can. It does not necessarily mean they hatched outside and climbed in. Check the bag, bottom seam, underside of the lid, and the area immediately around the can. (UC Statewide IPM Program; Terminix)

The larvae in ordinary household garbage are often associated with flies that use decaying waste, but color or size alone is not a dependable species identification. If the larvae are in a compost or food-scrap bin rather than mixed refuse, they may be part of a different decomposer community; consult your local compost program before treating or throwing away the contents. This guide is for larvae in household trash, not every wormlike organism found in soil, drains, pet food, or a compost pile.

Before you clean: contain the source and protect yourself

If the bin is indoors, open a route outside first and carry the can carefully; avoid dragging it through the kitchen. Put on disposable or washable gloves, close nearby food, and keep children and pets away while you work. You do not need to touch larvae directly. The aim is to contain the waste and debris, not stir them up or scatter them across the floor.

Outdoor trash can, tied garbage bag, gloves, brush, and soapy water for cleanup

Set out the cleaning tools before opening the can, and keep infested waste contained while you work.

Indoor bins and outdoor carts need different handling

For a small kitchen bin, tie off the liner without squeezing it, place it inside a second bag if it is leaking, and take it to the outdoor refuse container. Do not put loose maggots into a kitchen freezer to kill them: a food appliance is a poor place for contaminated waste, and freezing individual larvae does nothing to clean eggs, residue, or the can. Follow local trash or food-waste instructions for the sealed bag.

For a curbside cart, work outside on a stable surface where you can see the bottom, rim, lid hinge, and wheels. If you wash the can, keep soiled rinse water and debris from running into a street or storm drain; use a suitable drain or collection method under local rules. Never pour a chemical mixture onto soil or into a storm drain. If the cart is too heavy, close the lid and ask another adult or property manager to move it rather than tipping it alone.

Six ways to clear maggots and reset the bin

You can think of these as a sequence rather than six chemicals to try. Removing the breeding material and washing the container do most of the work. Boiling water and pesticide products are conditional options; disinfection is separate from killing larvae. A vinegar, salt, or baking-soda pour is not a substitute for that sequence: a household mixture may touch a few exposed larvae but cannot reliably reach waste caught in seams or remove the material supporting them. Relying on a scent or powder while the food residue remains leaves the breeding source in place.

1. Remove and seal the infested waste

Close the trash bag before lifting it out. If the liner is torn, place the whole liner and any loose food into a second heavy-duty bag, tie it securely, and follow your community’s refuse instructions. Do not empty infested material into recycling, an uncovered compost pile, or a yard-waste cart unless the local program specifically accepts it and explains how to contain it.

If the can has no liner, use a disposable scoop or a piece of stiff cardboard to lift out the soggy material and larvae together. Put the scoopable waste straight into a bag. Avoid shaking the can or hosing waste onto the ground: the mess can spread and the remaining residue still provides food for larvae. A tied, contained bag is simpler to transport and dispose of.

2. Collect stragglers and loose residue

Inspect the inside walls, under the rim, around the lid hinge, beneath the handle, and along the bottom seam. Remove visible larvae and clumps of organic debris with a disposable paper towel, cardboard scraper, or dedicated brush. Place those materials in the same sealed refuse bag. If larvae have already crawled outside the can, sweep or pick them up with a tool and bag them instead of crushing them into a porous surface.

This step matters because rinsing a few larvae away while leaving a meat spill or sticky liquid in a seam can leave the breeding site intact. Do not use bare hands, and do not reuse the scraper or brush on dishes, countertops, or food-preparation surfaces. Afterward, wash reusable tools separately with detergent and water, and wash your hands when gloves come off.

3. Use boiling water only when the bin can take it

Boiling water can kill exposed fly larvae on direct contact; Virginia Tech Extension lists it as a control for maggots in garbage cans. But a kettle is not the default choice for every bin. Near-boiling water can scald you, splash onto your legs, and may soften or deform a plastic cart that was not designed for that temperature. (Virginia Tech Extension)

Use it only if the container manufacturer permits it and you can place the empty can securely outdoors at ground level. Keep other people and pets away, wear closed shoes, pour slowly from a low height, and let the can cool before touching or moving it. Do not carry boiling water through the house to treat a kitchen bin, pour it from above shoulder height, or use it in a thin or heat-sensitive plastic pail. If you cannot confirm the can’s heat tolerance, skip this option and remove larvae with a scraper before washing with hot tap water and detergent.

Hot water is a contact treatment, not a substitute for cleaning. It may miss eggs or larvae hidden under a folded liner, in a hinge, or inside a food smear. Once the can is safe to handle, wash the whole inner surface and lid rather than assuming one pour has reset the bin.

4. Wash the can with detergent and a brush

After the bag and loose larvae are gone, use warm water and ordinary dish detergent or household cleaner to loosen grease, juice, and food residue. Scrub the bottom, walls, rim, lid underside, hinges, handle joints, wheel wells, and any drain plug. Those seams are easy to miss and can hold the damp residue flies need. UC IPM recommends regularly washing garbage cans with soap and water to remove the leftovers that can attract flies or allow development. (UC Statewide IPM Program)

Rinse only after the residue has been loosened and removed. If you are outside, direct rinse water to an appropriate sanitary drain or collect it; do not let a dirty wash stream run down a driveway into a storm drain. For a small kitchen bin, wash it in a utility sink or tub only if the can fits and you can clean and rinse that surface afterward. A brush with a long handle keeps your hands away from the dirty water.

When you finish, leave the can open until completely dry. Flies can still reach a wet bin if its lid stays open, so choose a ventilated spot away from food and bring it back only when the inner surfaces, seams, and liner area are dry. A wet can closed around warm food scraps is a poor reset. Check the cleaning tool and the area where you set it down, too: a brush placed on a food-contact counter can transfer grime even after the bin is clean. Store the dedicated brush where it can dry, and rinse and dry it after use.

5. Disinfect only when needed and by the label

Washing removes grime and organic material; disinfection is a separate step. For an ordinary trash-can maggot cleanup, detergent and thorough scrubbing are usually the essential tasks. If there was a separate sanitation concern and you want to disinfect, use a product whose label permits the can’s surface and location, follow its dilution and wet-contact time exactly, and rinse or air-dry as directed. Do not assume that a stronger solution works better.

If you use household bleach, first remove dirt with soap or detergent and water. Never mix bleach with vinegar, ammonia, dish soap, or any other cleaner or disinfectant; mixtures can release dangerous vapors. Use only the product label’s directions for dilution, ventilation, protective equipment, and disposal. CDC guidance emphasizes washing first and never combining bleach with another cleaner. (Centers for Disease Control and Prevention)

Do not pour a concentrated bleach soak into a can and close the lid so “fumes can work.” That is not a safe shortcut and does not replace physical removal. Keep the product away from children and pets, and do not use bleach in a way that can spill or run into stormwater. If you accidentally combine cleaners and develop burning eyes, coughing, or trouble breathing, leave the area for fresh air and contact emergency services or Poison Control in the United States at 1-800-222-1222.

6. Use a labeled bin insecticide only for a repeat problem

Most one-off cases do not require insecticide once the waste and residue are removed. If flies or larvae repeatedly return to an outdoor bin despite thorough cleaning and tightly sealed waste, consider a product only when its label specifically allows use in that kind of trash can or dumpster and lists the target pest. A spray labeled for flying insects in a room is not automatically suitable for a bin, kitchen, food-waste container, or indoor use.

Read the entire label before buying and again before applying. Follow the allowed location, pest, placement, dose, ventilation, protective equipment, and child and pet restrictions; never use more or apply more often than directed. EPA says to use nonchemical controls first and to use pesticides only for listed pests and sites, following every label precaution. (U.S. Environmental Protection Agency)

A bin product can suppress insects in the labeled space, but it cannot remove the old food that supports larvae. Do not apply insecticide to trash, loose food scraps, or a surface that could contact food unless the label explicitly permits that use. If the label is unclear, leave it off and contact the manufacturer or a licensed pest professional rather than guessing.

Prevent flies from laying more eggs

Keep food waste sealed and shorten the pickup interval

The best prevention is to make the bin a poor place for a fly to lay eggs: contain food residues, reduce wet leaks, and get refuse collected before it sits through a long warm spell. Use a sound liner, tie it before it is full, and double-bag only when the first bag leaks or local waste rules call for it. Avoid packing the bag so tightly that it tears when lifted.

Bag meat, fish, and wet food scraps promptly rather than leaving them loose at the top of a can. If pickup is several days away during hot weather, use a tightly sealed container or follow your local food-waste collection guidance; freezing scraps until collection may be an option only if it fits local disposal rules and you have a dedicated leakproof container. Do not assume every city allows plastic liners in organics or compost bins. Minnesota Extension recommends tightly tying garbage bags, regular can cleaning, and a tight-fitting lid to reduce fly attraction and breeding sites. (University of Minnesota Extension)

Close the lid and clean spills before they become breeding sites

A lid that closes fully limits fly access, but it will not protect food waste in a torn or open bag. Replace a cracked lid or broken latch, keep the rim clear so it can seal, and do not overfill the cart until the lid is propped open. Store outdoor bins on a stable, shaded spot if possible; shade can reduce heating but is not a substitute for sealed waste and routine cleaning.

Two outdoor refuse bins with their lids closed beside a home

Closed, intact lids reduce fly access, but leaking bags and food residue still need to be addressed.

After collection, check the bottom of the bin for liquid or food stuck to the sides. Wash it when there is visible residue or odor, then let it dry before relining. There is no single calendar that fits every home: a household that discards wet food daily in midsummer may need more frequent checks than a dry paper-waste can in a cool garage. UC IPM’s blow-fly guidance recommends putting garbage out at least weekly, even when a can is not full, because waste sitting longer can produce flies. Treat that as a useful warm-weather benchmark rather than a rule that overrides your municipality’s collection schedule; if pickup is less frequent, tighten and contain food scraps more carefully, clean spills promptly, and ask the hauler what sealed storage methods are accepted. (UC Statewide IPM Program)

PestWorld, the National Pest Management Association’s consumer resource, also recommends regular trash removal and well-sealed receptacles as part of fly prevention. If you see adult flies around the lid, clean the nearby ground and wall too; spilled waste just outside the bin can keep attracting them after the can itself is clean. (PestWorld)

If maggots keep returning after cleanup

Check beyond the visible bin

If larvae return after the can is empty and dry, inspect the liner folds, lid hinge, wheel area, drain plug, underside of the can, and the floor or soil around it. A few larvae may already have moved away to pupate before you cleaned; vacuum or sweep nearby, then empty the vacuum contents into a sealed bag. Search for a second source such as an unsealed food-waste pail, pet waste, a compost container, a dirty drain, or decaying material hidden behind an appliance.

If you repeatedly find larvae indoors but the bin is clean, the source may be elsewhere. House flies and blow flies can breed in garbage, animal waste, or other organic material; a sudden crop of adults or larvae near one wall, ceiling, drain, or enclosed void may point to a hidden source rather than a trash-can cleaning failure. Terminix’s pest guidance similarly describes waste, drains, pet waste, and carrion as possible breeding material, which helps explain why repeated cleaning of one empty bin may not solve every case. (Terminix)

Do not pour drain cleaner, bleach, or insecticide into a sink or floor drain just because larvae were seen nearby. Different fly groups use different breeding sites, and a drain problem needs the organic buildup identified and removed using drain-safe methods. If larvae appear from a drain, wall, ceiling, or inaccessible cavity, take a clear photo and seek species identification or a professional inspection rather than escalating chemicals.

When a licensed pest professional can help

Call a licensed pest management professional when the infestation is heavy, repeatedly returns despite removing all accessible organic waste, or appears to come from a wall, ceiling, crawlspace, or another inaccessible location. Ask the technician to locate and remove the breeding source, not simply spray around the bin. In shared housing, notify the landlord or property manager if waste containers, a communal dumpster, or a concealed building void may be the source.

If this is a food-service or shared commercial waste area, follow your local health department’s sanitation rules and the waste contractor’s procedures. A household cleanup method may not meet the cleaning schedule, runoff control, or pesticide restrictions that apply to a commercial site. The label on any pesticide still controls where and how that product can be used.

Conclusion

To get rid of maggots in a trash can, seal and remove the infested waste, collect loose larvae, and scrub food residue from the empty can with detergent and water. Boiling water can kill exposed larvae, but use it only when the bin is rated for the heat and you can pour without a burn or splash risk. Disinfectants and insecticides have their own labels and restrictions; bleach is never something to mix with vinegar, ammonia, or another cleaner.

Dry the can, close a sound lid, and keep wet food waste sealed until collection. If maggots appear again, check seams and nearby breeding material before repeating a chemical treatment. Clearing the source and preventing fly access are what keep the can from becoming a breeding site again.

Frequently asked questions

Why are maggots crawling out of my trash can?

Mature fly larvae often leave the wet food waste where they fed and move toward a dry, sheltered place to pupate. Check the can’s bag, bottom, seams, and nearby floor; the larvae may be leaving the breeding source rather than entering the bin.

Does boiling water kill maggots in a trash can?

Boiling water can kill exposed maggots on direct contact, but it can scald you and may deform a plastic bin. Use it only if the container manufacturer permits that heat and you can treat the empty can outdoors from a stable, low position; otherwise remove larvae with a tool and scrub with detergent and hot tap water.

Can I pour bleach into my trash can to kill maggots?

Do not use a closed bleach soak as a maggot treatment. Remove waste and wash with detergent first; if disinfection is needed, follow the product label, and never mix bleach with vinegar, ammonia, or any other cleaner.

How do I keep maggots from coming back in an outdoor garbage can?

Tie food-waste bags securely, keep the lid fully closed, avoid overfilling, and remove wet spills after collection. Wash the can when residue or odor remains and let it dry before adding another bag.

Why do maggots return after I have cleaned the trash can?

Eggs or organic residue may remain under the rim, liner folds, hinge, drain plug, or nearby ground, or larvae may be coming from another source such as pet waste, compost, a drain, or hidden decaying material. Inspect the whole area; repeated activity from an inaccessible space warrants a pest professional’s inspection.

How the "How to Get Rid of Maggots in a Trash Can: 6 Safe Ways" guide is reviewed?

Editorial policyReview board

Written by · Reviewed by LeafyPixels Review Board · Updated October 9, 2026

This "How to Get Rid of Maggots in a Trash Can: 6 Safe Ways" guide was researched and written by . Recommendations in the "How to Get Rid of Maggots in a Trash Can: 6 Safe Ways" guide are checked against multiple independent references before publication.

We prioritize sources that hold up under scrutiny:

  • University cooperative extension bulletins and fact sheets (Penn State, Clemson, UMD, NC State, and similar programs)
  • Botanical garden and horticultural society publications
  • Peer-reviewed plant science and veterinary toxicology references where pet safety matters (including ASPCA Animal Poison Control)
  • Established reference works on indoor plant culture

The LeafyPixels editorial team then reviews the draft for clarity, step-by-step usefulness, and fit with real apartment and home conditions-not ideal greenhouse setups. When guidance changes materially, we update the page and note the revision date.

What this guide covered

Guide recommendations are reviewed against relevant research, expert guidance, and practical constraints before publication.


Sources used

  1. Centers for Disease Control and Prevention (n.d.) Cleaning And Disinfecting With Bleach. [Online]. Available at: https://www.cdc.gov/hygiene/about/cleaning-and-disinfecting-with-bleach.html (Accessed: 9 October 2026).
  2. PestWorld (n.d.) House Flies. [Online]. Available at: https://www.pestworld.org/pest-guide/flies/house-flies/ (Accessed: 9 October 2026).
  3. Terminix (n.d.) Baby Flies. [Online]. Available at: https://www.terminix.com/other/flies/baby-flies/ (Accessed: 9 October 2026).
  4. U.S. Environmental Protection Agency (n.d.) Pesticide Safety Tips. [Online]. Available at: https://www.epa.gov/pesticide-incidents/pesticide-safety-tips (Accessed: 9 October 2026).
  5. UC Statewide IPM Program (n.d.) Flies. [Online]. Available at: https://ipm.ucanr.edu/home-and-landscape/flies/ (Accessed: 9 October 2026).
  6. University of Minnesota Extension (n.d.) Flies. [Online]. Available at: https://extension.umn.edu/garden-and-home/home-maintenance/household-insects/flies (Accessed: 9 October 2026).
  7. Virginia Tech Extension (n.d.) ENTO 134. [Online]. Available at: https://www.pubs.ext.vt.edu/ENTO/ENTO-134/ENTO-134.html (Accessed: 9 October 2026).