Quick answer: To get maggots out of a trash can, empty the bin, then pour boiling water (or a strong vinegar solution) directly over the maggots to kill them on contact. Scrub the bin with hot soapy water and disinfectant, let it dry fully in the sun, then prevent a repeat by bagging all food waste, keeping the lid sealed, and rinsing the bin after every collection. Most infestations clear in under 30 minutes.
Maggots are fly larvae. They appear when a fly lands on exposed food waste and lays eggs, which hatch within a day in warm weather. Seeing them is unpleasant, but the cleanup is quick once you know the order of operations.
Why does my trash can have maggots?
Three conditions invite them: exposed food scraps, warmth, and moisture. A fly needs only a small gap and a few hours. Meat, dairy, pet food, and fruit are the biggest attractants because they break down fast and smell strong.
If you keep finding maggots, the cause is almost always one of these:
- Food waste going in loose instead of bagged.
- A lid that does not seal, or a bin left open.
- A bin that never gets rinsed, so residue builds up.
- Summer heat speeding up the whole cycle.
Step 1: Empty and remove the source
Take the bin outside. Empty everything into a sealed bag and remove it from the area immediately. The larvae need the rotting food to survive, so cutting off their food source is half the battle.
Wear gloves. Work in a spot you can hose down afterward, like a driveway or yard.
Step 2: Kill the maggots
Pick one method. All three work.
Boiling water (fastest and free). Boil a large pot and pour it directly over the maggots and along the bin walls. Heat kills them instantly. This is the go-to method because it needs nothing you do not already own.
White vinegar solution. Mix one part vinegar to one part water, or use it straight for a heavy infestation. Pour it over the larvae and let it sit for a few minutes. Vinegar kills them and also neutralizes the odor that draws more flies.
Salt or diatomaceous earth. Both dehydrate maggots. Sprinkle generously, wait, then rinse. Useful if you have no way to boil water outside.
Avoid bleach as your first move. It is harsh, fumes badly in an enclosed bin, and boiling water or vinegar handles the job without the hazard.
Step 3: Scrub the bin
Dead maggots are only step one. Fly eggs and residue cling to the plastic.
- Rinse out the killed larvae with a hose.
- Fill the bin with hot water and dish soap, or use a disinfectant spray.
- Scrub every surface with a long-handled brush, paying attention to corners, ridges, and under the lid rim.
- Rinse thoroughly.
Step 4: Dry and deodorize
Leave the bin open to dry completely, ideally in direct sun. Sunlight and dryness discourage new larvae, and a damp bin invites them straight back.
Once dry, deodorize. A sprinkle of baking soda in the bottom absorbs smell. A few drops of peppermint or eucalyptus oil on a cloth wiped inside the lid repels flies naturally.
How do I stop maggots from coming back?
Prevention is where you actually win. A clean bin with no exposed food gives flies nothing to lay eggs on.
- Bag everything. Never put loose food waste in the bin. Double-bag meat, fish, and dairy.
- Seal the lid. Fix or replace a lid that does not close fully. This is the single most effective fix, and a common complaint on r/CleaningTips where open lids get blamed most often.
- Rinse after every pickup. A quick hose-down after each collection stops residue building up.
- Freeze the smelly stuff. In hot months, keep meat and fish scraps in the freezer until collection day, so they never sit and rot.
- Line the bottom. Newspaper or a liner catches drips and keeps the base dry.
- Deploy repellents. Peppermint oil, bay leaves, or a small amount of ground cinnamon near the lid deter flies.
Do maggots die on their own?
Eventually, yes, they pupate into flies, which is worse. Waiting is never the answer. Left alone, maggots mature in about a week and become the next generation of egg-laying flies, restarting the cycle. Kill and clean now.
When to replace the bin
If a bin is cracked, has a broken lid, or holds a smell you cannot scrub out, replace it. Deep scratches and porous, aged plastic trap residue that keeps drawing flies no matter how often you clean.
FAQ
Does salt kill maggots?
Yes. Salt dehydrates them. Cover them generously, wait several minutes, then rinse.
Is it safe to pour boiling water in a plastic bin?
For most standard trash cans, a single pour of boiling water is fine and evaporates fast. For thin or aged plastic, use very hot tap water plus vinegar instead.
Will bleach get rid of maggots?
It can, but it is unnecessary and produces harsh fumes in a closed bin. Boiling water or vinegar is safer and just as effective.
How fast do maggots appear?
In warm weather, fly eggs can hatch into maggots within 24 hours, which is why a single hot day can turn a clean bin into an infested one.
