How to Avoid Maggots in the Garbage Can Forever

It’s springtime once again, and as the weather warms chances are you’ve found some horror-movie material lurking in your garbage can. Myriads of tiny pale, slimy, wriggling worm-like creatures – maggots!

As a retired pest control technician, I’ve had my share of frantic calls to deal with invasions of these disgusting little vermin, so here are some tips for getting rid of maggots, and how to avoid repeat infestations.

The quickest, cheapest solution for killing maggots is simply boiling water. Pour boiling water over the maggots and rinse out the garbage can with it. Add white vinegar to increase its disinfecting properties of the mix and keep flies away from the garbage can.

Is this ideal for all situations?

Likely not.

Boiling water is best used when the garbage has already been collected and you’re cleaning out the can before putting in a new batch.

maggots in trash can

If it’s not collection day yet, though, a solution that lasts longer and doesn’t leave your garbage wet is better.

The Maggot’s Life Cycle

Let’s step back for a bit and review your problem and what causes it.

Maggots are the larvae of several kinds of flies such as bottle flies, house flies, fruit flies, and stable flies.

These flies are attracted to rotting food, feces, and other such filth, and lay their eggs in them by the thousands.

You can identify maggots from other kinds of insect larvae by the following traits: white or off-white color, no legs, pointed on one end, and a length of 3-12 millimeters.

Maggots fatten themselves up on what to them is easily digestible food – rotting organic matter – and after a few days to weeks are ready to pupate.

This content is property of wypestcontrol.

At this point, they will leave their food source and begin migrating in search of a hiding place in which to complete their metamorphosis.

This is when you find maggots on your floor instead of in your trash. Once they find an ideal spot, they turn into immobile pupae, and after several days or weeks, these turn into adult flies.

Fly life cycles have a variable length depending on weather and species.

Generally, the warmer the weather the faster maggots can hatch and grow to pupa than the adult stage. For this reason, residents of the warmer states are likelier to have maggot problems and more often than farther north.

Maggots’ ability to invade your garbage from seemingly out of nowhere can indeed seem magical.

Maggots cannot chew their way into plastic garbage bags, as some may think, but their fly parents do have some superpowers aside from the ability to go for two hours.

For one, they have an incredible sense of smell that lets them home in on rotting stuff from up to four miles away.

And tiny size is a superpower all its own, giving flies, their eggs, and maggots the ability to sneak past us undetected and enter openings we never suspected were there.

Whenever you buy fruit or vegetables, especially from an outdoor market, you can assume there are already fruit fly eggs on them.

You just can’t see them with the naked eye.

To survive, however, maggots need a warm, dark environment and food with high moisture content.

This, unfortunately, describes most of our food wastes such as bones, meat scraps, and the peelings of fruits and vegetables. However, maggots are pretty fragile and can be easily attacked by exploiting their weaknesses.

image of maggots

One, they can’t stand sunlight for long.

Two, their skins can’t retain moisture well; a sprinkling of salt will kill them!

Three, they can only eat foods that are soft and moist, preferably something already decomposing.

And lastly, to get into your garbage maggots have to be brought in as fly eggs – which the fly can do only if it finds your garbage.

These weaknesses will the core of our thriftiest strategies for dealing with them.

How to Get Rid of Maggots in the Garbage Can

You can get rid of maggots in many ways, from simply letting sunlight and birds get at the interior of your garbage can to all-out warfare with disinfectants and pesticides.

Choose a method that works with your circumstances and what you’ve got on hand, budget, location, and local laws.

Location and local conditions such as the drainage system should play a part in your decision-making.

For example, if you live in a location where your wastewater from cleaning out a trash can is likely to end in a river, lake, or the sea, I’d think twice about using certain chemicals.

To give you a picture of what’s possible and why you should try it or maybe think twice, I’ll give you a quick list of methods I consider safe and responsible for home users.

Please note the caveats for each, as some of these methods must be used with proper caution or they can be hazards for you, your children, or pets, or even get you in trouble with the law.

Safety first!

Pour Boiling Water On Maggots

Method: Pour into the garbage can; add 1 part vinegar to 3 parts water as disinfectant and deodorizer as desired.

Advantages: Cheap and simple, and possibly the most environmentally-friendly solution.

Caveats: Boiling water alone does not prevent re-infestation; adding vinegar will help do so for a while

Put Terro Guard Pod Into A Can With Maggots

Method: Stick a Terro Guard pod inside the garbage can.

Advantages: This is my preferred method since it has a lasting effect that kills flies and maggots and repels future infestations; safer application method of pesticide than spraying or dousing.

Caveats: Extra care must be taken to secure the pod to the inside of your container. Take care not to inhale the fumes, as this could expose you to harmful chemicals.

Not recommended for indoor trash cans.

Use Vinegar for Disinfection

Method: Pour pure vinegar into the garbage can.

Advantages: Simple, disinfects. Note that vinegar kills the germs most likely to be found in rotting food, such as E. coli, which is what we want to do. However, vinegar doesn’t kill the germs that cause colds, flu, and Covid 19.

Caveats: Using vinegar alone is of course more expensive than vinegar and boiling water, but will prevent re-infestation a bit longer. Will cause a strong odor though, and beware of inhaling large quantities of vinegar fumes.

Sprinkle Salt on Maggots

Method: Sprinkle salt generously on the maggots and bottom of the garbage can.

Advantages: Cheap and simple.

Caveats: Excess amounts of salt can get into local bodies of water, creating problems for fish and wildlife.

Use Mix of Bleach and Water

Method: Mix equal parts bleach and water and pour over the maggots.

Advantages: Simple, disinfects.

Caveats: Be sure to dispose of bleach properly. Make sure not to pour bleach into storm drains which could poison a nearby lake or river.

Do not use bleach in combination with vinegar or with any of the other chemicals mentioned here. Doing so can release toxic vapors such as chlorine.

Dry Maggots With Diatomaceous Earth

Method: Sprinkle the diatomaceous earth over the maggots.

Advantages: Simple, dries up the maggots and reduces their odor.

Caveats: Take care not to inhale any of the powder or get it in your eyes, it can irritate the eyes and nasal passages.

Consider Using Ammonia

Method: Pour ammonia over the maggots and garbage; leave the can covered until garbage has been collected. Handle dangerous chemicals only with gloves.

Advantages: Simple, disinfects.

Caveats: Toxic to aquatic animals; don’t dispose into a storm drain.

Use Dog Shampoo Mix

Method: Mix 4 parts boiling water and 1 part dog shampoo and pour over the maggots

Advantages: Simple

Caveats: Permethrin, the active ingredient in dog shampoo, is toxic to cats and aquatic animals; also take care not to get any in your eyes, nose, or mouth.

Spray Roach Killer on Maggots

Method: Just spray any ant or roach killer, preferably one containing permethrin, on the maggots and garbage.

Advantages: Simple

Caveats: Takes a little time to work; follow all safety rules for using permethrin-based pesticide.

Let Sun and Birds Do The Work

Method: Just leave the garbage can lid open after the garbage has been collected (and only after collection!)

Advantages: Even simpler and cheaper than boiling water, and attracts birds to your house.

Caveats: Can cause an odor problem; attracts more flies; if there’s leftover garbage, birds can potentially scatter this filth around, which can spread disease; can attract unwanted kinds of wildlife.

Avoid Mothballs, Carburetor Cleaner and Motor Oil

Not recommended due to safety and legal issues

Read more on this below.

How to Prevent Maggots in the Garbage Can

maggots in trash can

The simplest way to keep maggots from your garbage is to deny maggots what they need to survive.

We want to deny flies access to our food wastes so they can’t lay eggs on them, deny food or moisture to the growing maggots, and eliminate the rotten odors that will draw them to your location in the first place.

Here are some proven tips for doing this in your kitchen and household:

Preventing Flies and Maggots in the Kitchen

  1. Minimize food wastage; don’t overstock perishable foods
  2. Freeze bones and meat scraps, and take them out only for garbage collection day
  3. Dry out your food scraps as much as possible before throwing them away
  4. Add absorbent dry materials to your garbage bags such as paper towels, sawdust, or the like to reduce moisture
  5. Wash fruits and vegetables on bringing them home to remove fruit fly eggs
  6. Keep ripe fruits and vegetables in the refrigerator
  7. Cover any food let outside the refrigerator with a solid or net cover (the mesh should be fine enough to keep out fruit flies)
  8. Keep the kitchen clean and dispose of food scraps immediately
  9. Rinse all food packaging free of food scraps before disposal
  10. Seal garbage bags well to keep flies from getting in
  11. Use only good-quality garbage bags that won’t split
  12. Install screens on your windows and doors
  13. Deodorize garbage in your kitchen with baking soda so flies can’t find it
  14. Add a little dish-washing liquid to your garbage bags
  15. Keep electric fly traps in the kitchen
  16. Scent your kitchen with oregano leaves, or extracts of mint, citronella, or lemongrass

Oh, and one last tip from a retiree: My wife and I are getting along in years, so we’re rather more absent-minded nowadays.

After several bad experiences, we’ve learned to set an alert in our smartphones to put our leftovers in the fridge at 10 p.m.

It’s done a lot to save us from food spoilage, which in turn reduces the amount we have to throw away as maggot-feed.

As a side benefit, most of these methods will also help control that other great enemy of health, sanity, and the masculine ego, the cockroach.

Preventing Flies and Maggots Outdoors

  1. Dispose of fallen fruit immediately if you have fruit trees in your garden
  2. Reduce flies around the garbage can using glue traps or electric traps; use multiple traps
  3. Don’t leave uneaten pet food outdoors
  4. Dispose of pet feces immediately and properly
  5. If you smell something bad in or around your property, find it and clean it up immediately
  6. If you find dead wildlife, bury them instead of throwing them into the garbage can
  7. Line your garbage can with a large garbage bag
  8. Secure garbage can liners with a rubber band around the rim to keep them from falling in
  9. Make sure your garbage can lid fits tightly
  10. Use dog- or wildlife-proof garbage cans, maggot infestation increases when animals tip over your bins and tear up your garbage bags
  11. Place oregano leaves, mint leaves, or extracts of citronella or lemongrass inside your garbage can to repel flies
  12. Place Terro Guard inside your garbage can
  13. Line the bottom of your garbage can with diatomaceous earth
  14. Clean, deodorize, then expose the interior of your garbage can to strong sunlight after every collection

Speaking of wildlife, here’s one last prevention tip.

If you suspect you have mice in the house, it’s better to go after them with traps rather than rat poison.

Poisoned rodents tend to die in the most inconvenient and inaccessible places, and if there’s anything a fly likes better than food scraps to feed its babies, its decomposing carcasses.

Don’t rely on rat poison labels claiming they motivate rodents to seek light as they’re dying; their instinct to hide has proven to still be stronger.

If you spot a maggot infestation outside your waste-can, especially if you smell something bad, you’ve likely got a dead animal in some corner of the house.

Mothballs Vs. Maggots

While mothballs can kill maggots and discourage flies from spawning on your garbage, there are also good reasons not to recommend this, particularly for residents of warmer climates. 

Mothballs are meant to control clothes moths but can be hazardous when employed in ways they’re not designed for.

In fact, the EPA makes it illegal to use mothballs in any applications other than what is explicitly specified on the product label.

The EU has banned all mothballs containing naphthalene or paradichlorobenzene, which are the most common types sold.


And why is it a specially bad idea to put mothballs in the garbage can?

Mothballs work by sublimation, that is by turning directly from solid to gas at room temperature.

This process is accelerated under higher temperatures, such as you might expect from a garbage can left outdoors in direct sunlight and warm weather.

Leaving mothballs in your bin under such conditions will fill it with a nasty cloud that is irritating and toxic.

Not a good way to welcome your garbage collector!

Mothball fumes, both those containing naphthalene and paradichlorobenzene, can cause headaches, dizziness, nausea, and are suspected to be carcinogens.

If the older naphthalene mothballs are still available in your area, the mothballs you’re using could also release flammable fumes.

Concerns over mothballs getting into the groundwater or poisoning wildlife have also caused governments to clamp down on their use.

There are newer brands of mothballs that use Transfluthrin or another kind of pyrethroid compound.

These are of lower toxicity than the old-style mothballs, but are still controlled substances and should be used with caution.

Bottom line: yes, mothballs will work, but there are better methods that are also legal where you live.

If you want to use mothballs to control maggots because that’s what you’ve got on hand, check the label for the product’s composition and for precautions, and check your local laws.

Why Not Use Carburetor Cleaner Against Maggots?

Again, this is a method that works but is a cure that may be worse than the original problem.

Carburetor cleaner is a powerful and toxic solvent, and the method for employing it makes it release toxic fumes.

To use carburetor cleaner, you need to add it to hot water, and this of course makes it release more fumes in a shorter time.

It’s hazardous for you, your kids, and your pets, and may also be controlled by the laws in your state.

Motor oil also works by releasing fumes toxic to maggots and flies. While less toxic than carburetor cleaner, motor oil makes up for it with its flammability.

You especially do not want to use this in very hot weather!

Again, if you’re desperate enough to want to try this it may be better and safer to call a pest control company instead.

Harm That Maggots Can Do

image of maggots

Aside from being so disgusting, can maggots actually cause you any harm?

Scientific studies have shown that disgust is a protective instinct that evolved to make us avoid potential sources of disease and parasitic infection.

So yes, there’s a good reason for your innate aversion to maggots.

While maggots are not poisonous in themselves, the filth they crawl in means they can bring hitchhiking bacteria anywhere they go.

Should a maggot infestation begin to spill outside your trash can, there’s a chance some of them might make it into your kitchen or your neighbor’s, and from there get into food.

Accidental ingestion of maggots can cause any number of gastrointestinal infections such as salmonella and E. coli, either of which can send you to the hospital.

Maggots that mature into flies can create an even bigger problem, as these become wide-ranging vectors of disease able to pick up pathogens from afar and bring them back to your food.

And then there’s myiasis – when maggots get into the body and mature there, feeding on your flesh from the inside.

While it’s more common in tropical regions, where some aggressive flies will lay eggs in open wounds, even the housefly’s maggots can cause myiasis through accidental ingestion or introduction into the body through an open ulcer.

Contact with infested livestock or their carcasses can expose you to maggot species like those of the horse botfly that can burrow under your skin.

Myiasis can occur under the skin, especially around a wound, in the mouth, the nostrils, the eyes, even inside the digestive tract.

When mature, the maggots now turned into flies come out like miniature chest bursters from Alien. Myiasis is a danger not only to us but also to our pets, especially in the paws of cats and dogs.

Real horror movie material, eh? That’s exactly what that sick feeling you’re experiencing now is for; to encourage hygiene.

Are Maggots Good for Anything?

maggots as fish bait

Despite their ickiness, maggots can be useful creatures.

In fact maggots, carrion beetles, and other such scavengers have a vital function in nature.

They break down animal carcasses and rotting vegetation, turning them into nutrients that can go back into the ecosystem to fertilize grass and trees and such.

Without them, carcasses would take much longer to decompose, which gives dangerous bacteria more time to increase and spread into the soil and water. 

Our problems with maggots arise from our settled lives – unlike wild animals that can move away from carrion, we live in houses and keep our garbage in fixed locations.

That just makes us so much easier for flies to find than wild sources of food. So for the sake of our health, we have no choice but to extirpate and try to prevent maggot infestations.

Aside from their ecological functions, some maggots also have a surprising medical use.

Maggots can be employed for wound debridement, that is to eat away necrotic tissue to allow healing.

They have proven effective and have been approved by the FDA for the treatment of a variety of wounds and ulcers that are not healing properly, such as diabetic foot ulcers.

However, the maggots used in therapy are specially bred for the purpose, and can only come from species proven not to cause myiasis. In other words, they will only eat the tissue that’s gone bad, and not invade the rest of your body.

There’s another kind of doctor that finds maggots useful, but these doctors only deal with dead people.

Forensic scientists have found that the kinds of insects and insect larvae present at a crime scene, and their state of development gives clues to the time of death, and even of changes to the body’s position after death and substances present.

For example, it’s been found that insect larvae such as maggots can accumulate drugs like cocaine from a corpse and that this hastens their development.

It’s also been found that some poisons make it harder for insects to colonize the corpse, so a delayed development of infestation could point toward death by poisoning. So yes, these humble creatures can also be CSI heroes.

Lastly, maggots are in demand as fish bait, and there are studies ongoing to investigate their potential as cheap and easily grown livestock feed, which can ease the pressure on rapidly dwindling supplies of fish.

Currently, most livestock feed protein comes from fishmeal, but as overfishing has compromised stocks of the small fish normally used for this, a good substitute has become necessary.

Maggots of the black soldier fly are now being bred by some pioneering companies, initially as pet food and now expanding into livestock feed.

However, maggots for feed have to be grown in controlled conditions to ensure they won’t pass on any diseases.

This isn’t going to make an instant gold mine of your garbage pail by selling its squirming occupants.

If the technology catches on, however, there’s a chance the feed growers can either become customers for your garbage or contract with municipalities to help truck away and dispose of garbage in your area, likely with some new rules and controls over how you dispose of waste.

It also restores the original idea of keeping livestock in the first place, which is to take the food you can’t or won’t eat into the food you do eat.

When To Call Pest Control vs Maggots

If you constantly have maggots in the house and cannot find their point of origin, or can’t get at it, it’s likely time to call in your pest control experts.

You may have a dead rat or similar animal lodged somewhere in your walls, attic, or the understructure of your house, or the apartment next door or above yours. In such cases, trying to deal with the problem yourself might lead to exposure to disease or harmful chemicals.

Professional pest control experts can also advise you on aspects of pest elimination and prevention that you can’t easily see for yourself.

For example, here’s one case I heard of from a colleague: recurrent bad odors and infestations of maggots were reported in a vacant, overgrown lot in the suburbs.

The latest infestation of maggots was traced to a missing dog that had died there and become a breeding ground for flies. The remains of another missing pet were also found on the lot.

But why there?

It turned out there was a much bigger problem; the lot was inhabited by a venomous snake.

Solution: after spraying the dog carcass, the overgrowth was cleared away, which drove the snake elsewhere. There have been no more maggot outbreaks, and the neighborhood’s dogs and children have been much safer since.

So yes, while there’s a lot you can do at home, it’s also good to play it safe and call in professional help for recurrent and mysterious infestations.

Photo credit: ©

Medical Disclaimer: TheHomePestControl is a digital publisher and does not offer personal health or medical advice. The contents of this website are not intended to substitute for professional medical advice, diagnosis, or treatment.

Affiliate Disclaimer: As an Amazon Associate, I earn from qualifying purchases made on our website. If you make a purchase through links from this website, I may earn a commission at no additional cost to you.

Similar Posts