How to Stop Maggots Getting in Your Trash Bin

All it takes is one fly, maybe two, with access to your trash bin. Before you know it, you will have a maggot infestation on your hands.

Fortunately, maggots are pretty slow and won’t go outside their immediate habitat. Once they turn into flies, however, they will become a serious problem quickly. 

There are a number of methods for getting rid of maggots in your trash bin, including boiling water, insecticides, bleach, Diatomaceous Earth, Lime, and even some useful options. However, the best method is through prevention.

One of the biggest problems people have with their outside trash bins is how they are treated during garbage pick-up, especially with the mechanical arm method, which slams the trash bin around so hard the lid often becomes detached. This only exacerbates the potential maggot problem.

What Causes Flies in Your Trash Bin?

As we mentioned above, not having a lid on your trash bin is problematic because it gives flies unmitigated access to your trash. It’s one of the best environments available for flies to lay eggs. 

Trash bins are usually warm inside, thanks to their sun absorption throughout the day, and are full of loose trash, food, liquid, and all of the things flies prefer to lay their eggs in.

When the eggs hatch, there is a huge and abundant source of available food for the maggots to consume. 

The smell is a huge attractant as well. Flies can detect smells from long distances and they will swarm to the source of that smell at the first opportunity. As a scavenger insect, a fly couldn’t hope for a more hospitable environment than a trash bin. 

How to Prevent Flies from Targetting Your Trash Bin

The best way to avoid getting maggots in your trash bin is to make it an inhospitable place for flies to congregate and lay eggs.

You don’t have to do much to make it that way but you will need to focus on purchasing stronger garbage bags that seal well. 

  • Rinse out your trash bin once a week
  • Use stronger garbage bags that won’t leak
  • Make sure the trash bin lid is always down
  • Don’t throw loose garbage in the bin
  • Avoid pouring fluids into your garbage bags

Rinsing out your trash bin is not the prettiest job in the world but it’s something you should consider, especially in the summer months when flies are prevalent and just looking for an excuse to lay thousands of eggs. 

Of course, you need to make sure there is no solid garbage in there when you rinse it and only rinse it after the garbage is picked up.

Garbage bags can get expensive, especially when you tally them with everything else you have to buy at the grocery. 

It’s easy to just go with a big roll of cheap garbage bags. Unfortunately, those cheap garbage bags are cheap for a reason.

They tear easily and are prone to leaks. Purchasing quality garbage bags, especially the kind that seal well at the top, is an important factor when you’re trying to keep the flies away. 

Always make sure you keep your trash bin lid closed. It’s easier said than done when you’re dealing with trash companies that fling your garbage can around like a ragdoll whenever they show up.

But if it rains and you have water at the bottom of your trash bin, it will attract flies, along with mosquitoes, which is sometimes worse. 

Avoid throwing your loose garbage inside the trash bin, especially if its a food or a liquid of some sort. Last but not least, avoid pouring any liquids or throwing half-full bottles, missing their lids, in the trash bin. Flies love sugar. 

How to Get Rid of Maggots

It’s surprisingly easy to get rid of maggots in your trash bin. The only problem is, getting to them before they become flies.

Maggots feed for approximately 5 days. Once they are full to bursting, they will wriggle off somewhere and enter the Pupae stage. 

Depending on the weather, the Pupae stage can last between 6 days and 30 days. This is why summertime is bad.

In nice, warm weather, the newborn fly will burst out in 6 days. The warmer the temperature, the fast the pupae stage. 

Once you see that there are maggots everywhere inside your trash bin, there is no telling how long they’ve been feeding. In other words, you need to wipe them off the face of the earth as quickly as possible. 

Standard Insecticide

You don’t have to get too creative with insecticide. If the label on the can says it will kill flies, it will kill the maggots too.

Emptying a can of insecticide in a trash bin comes with its own inherent dangers, of course. The vapor of the spray tends to rebound and come back out the top.

Make sure you are wearing a protective mask or you are in a well-ventilated area because you don’t want to breathe that stuff in.

Insecticides will effectively kill every maggot that it touches. If you close the lid immediately after spraying, the fumes will kill the rest as well. 


The bleach fumes are more effective than the bleach itself. Simply pour a couple of cups of bleach down in the trash bin and shut the lid.

If you’ve ever been in a room with a freshly bleached floor, you know how harsh bleach fumes are. 

Those fumes are also harmful to maggots, killing them quickly. It will take about half an hour after you close the lid to kill them all.

Bleach is one of the most effective and cheap methods to use and it comes with the added side effect of sanitizing your trash bin. 

Diatomaceous Earth

This stuff works by slicing and dicing the insects it comes into contact with, rupturing their exoskeleton and spilling their body fluids out, eventually dehydrating them. It’s nasty stuff and pretty harmless to humans and pets. 

Since maggots have a very soft exterior, Diatomaceous Earth will wreak havoc on their bodies. Just be sure, when you sprinkle it in your trash bin, that you coat all of the maggots in Diatomaceous Earth. It will kill other insects as well, so the added benefits are nice. 

Just be careful not to breathe the stuff in. It’s not toxic, but the tiny particles are razor sharp and have the potential to cause breathing problems. 

Boiling Water

One of the simplest methods of getting rid of maggots is to douse them in boiling water. It will kill them instantly. However, you need to make sure the boiling water contacts all of the maggots. The ones that are untouched will live. 

The best way to do this is to tip the bin at an angle and slowly pour the boiling water over each side. Maggots will spend most of their time close to the bottom, either on the bottom or clinging to the walls. 

Lime and Salt Combination

This stuff works just like Diatomaceous Earth. You can either make the mixture yourself (half and half) or purchase the mixture, which is available at most hardware stores.

Like the Diatomaceous earth, just sprinkle it all over the maggots. They’ll react by curling up and falling off the walls of the trash bin.

Diluted Vinegar

You only need one part vinegar and two parts water. The best part of this is you don’t need to pour it. You can fill up an empty spray bottle with the stuff and spray the maggots directly. Vinegar is harsh on their bodies and the fumes that vinegar creates are not good for them either. 

It’s not as effective as bleach or Diatomaceous Earth, but it will definitely do the trick in a pinch. Like bleach, vinegar is also good for sanitizing your trash bin, so you get the best of both worlds when you use it. 

You Can Use the Maggots for Your Compost

If you happen to be a gardener and own a composter, maggots are phenomenal little workers for your compost pile.

They readily consume all of the material in your compost pile and poop it out, creating an excellent and powerful compost for your garden. 

It’s not the easiest thing in the world to get the maggots from your trash bin to your composter but it’s definitely worth the effort.

If there’s one thing maggots love, it’s a good compost pile. They’ll also speed up the composting process, so it’s beneficial if you need fresh, viable compost in a hurry. 

The only drawback is that the maggots will eventually become flies, so you will have to deal with that when it happens. 

Bottom Line

Stopping maggots from getting in your trash bin is as simple as creating an environment that is not hospitable to them.

Keep your trash bin clean. It may not be the cleanest job in the world but if you keep it clean on a regular basis, you’ll find that it’s much easier to handle. 

Alright, that’s it for this article, here are a few hand-selected articles that you might also find interesting reads:

10 Myths about Flies

How To Stop Bugs Getting In Your Room

How to Stop Bugs Getting Into Your Bathroom

Steve Foster

Mad about bugs and wanting to publish as many articles as I can to help educate people about these amazing beautiful creatures! For more info check out my about page

Recent Posts