When you get maggots in your trash, it can be a little unsettling! Don’t worry, it is very common, especially during the hotter months of the year. Flies will lay eggs inside a garbage can if they can get access. The idea is that flies lay their eggs in your trash because there is a food supply in it for the maggots. Once hatched, the maggots will feast on the food until they progress onto becoming a fly. Before you know it, you will have a maggot-infested garbage can! Now you know why they are there, let’s take a look at how to get rid of maggots in your trash can…

What you will learn in this post:

  • How to get rid of maggots in your trash can
  • How to prevent maggots from getting in your garbage
  • How to clean your garbage to remove the maggots

How To Get Rid Of Maggots In Your Trash Can

Why Do You Get Maggots In Your Trash Can?

First, you need to understand why you get maggots (larvae) in your trash can. Here are the 3 most common reasons…

Easy Access

If a fly can easily access your trash can, it will get in!

If your trash is attractive to a fly, and you are giving them easy access, then you will have an infestation in no time.


Food is probably the number 1 reason why you have maggots in your garbage can!

I mentioned in the intro that flies lay their eggs in your garbage because there is food in it ready to be consumed as soon as the larvae are born.

When I say eggs, I mean tons of eggs! The female fly will lay thousands of eggs in one sitting.


Flies are not just attracted to food, they also need water to survive.

Any water or liquid in your garbage can will attract flies into it, especially if they have access. Whilst the fly is in there drinking up the water, it may also hunt around for food and may even lay a few thousand eggs!

How To Get Rid Of Maggots In Your Trash Can

Most of us have to deal with maggots at least once in our lives! It is far too common to avoid it, unfortunately.

Thankfully, and because it is so common, there are many things that you can do to help your situation. If you want to know how to get rid of maggots in your trash can, then these 5 tips will help.

How To Get Rid Of Maggots In Your Trash Can Infographic

1. Security

I am not talking about employing a security guard to protect your garbage can! I am talking about ensuring that the trash can will be completely closed from the outside world of trash pests like maggots.

If maggots and flies cannot get into your trash can, then you will not get a maggot infestation in it!

2. Wait Or Action Now?

Once you see that you have maggots in your trash you have a decision on your hands! Do you resolve it now, or do you wait until your trash has been collected?

It is easier to clean out your trash once it has been collected, but it depends entirely on how long you have to wait.

Before you decide, you should know that maggots will turn into flies within the next 48 hours. Potentially, this maggot infestation will turn into a fly infestation!

3. Bleach

There are 2 things that I would use immediately to clean out the trash, but it depends on whether or not the trash has been emptied or not. Bleach is my go-to cleaning agent for maggots!

If you want to kill maggots in your trash can, then bleach is the way to go.

4. Boiling Water

The second thing I would use to clean out the trash can is boiling water. This will kill maggots on impact, but it will also cover your trash with boiling water! You should consider whether this will be a problem before using it.

Also – be very careful when using boiling water. You will already know how dangerous it can be. Boiling water can cause permanent damage to your skin!

5. Diatomaceous Earth

I am a big fan of diatomaceous earth as a natural pesticide! For trash invaders, diatomaceous earth is excellent.. for killing ants, and killing maggots too!

If you want to know one of the best and natural ways of getting rid of maggots in your garbage can, then I suggest sprinkling some diatomaceous earth in your trash. This is the best way of dealing with the problem if you have to wait too long for the collection day.

How To Clean Garbage Can With Maggots In

Do, you’ve got maggots in your trash can, and now you need to clean it!

The answer to this depends on how long you need to wait for the trash to be collected. If your trash is due to be collected within the next day or two, then your best bet is to wait until that has happened. Then you should clean out your trash can with bleach and boiling water.

If you need to clean it before the trash is collected, then I would use diatomaceous earth to kill off all the maggots first.

If you are desperate to clean out your trash, then you need to find an open space when you can place all the garbage bags whilst you clean it out. Then you should use bleach and boiling water to give the garbage can a thorough clean.

Before placing the bags back in, you should triple bag them. Better still, triple bag them and take them to the local waste disposal organization. Then you can start afresh with a clean garbage can!

Once you have finished, you should ensure that no flies can get into the garbage can!

How To Prevent Maggots In Your Garbage Can

OK, so we now know how to get rid of maggots in the garbage can, but how do you keep them out?

The best way is to make sure they cannot get in. You should consider getting a garbage can lid that is fully secure on top of the garbage can. If you can, then you should buy a lid that clips on securely to the top of the garbage can.

Also – you should consider double bagging all food before placing it into the can. That way, the flies cannot get to it to lay their eggs.


If you want to know how to get rid of maggots in your trash can, then the tips on this page will absolutely help! We have also covered the process of cleaning your trash can.

When I got maggots in my trash can a few years back, I took it as a warning. The only way you can stop this is by storing your trash securely. That means making sure the lid is sitting flush on the can and flies cannot get in.

No flies means no maggots!

Good luck…

About the Author

Pest Pro

Since 2008, I have become far too obsessed with DIY methods to get rid of pests! From cockroaches, woodlouse, ants, and other crawling pests, to flying pests such as mosquitos, I have searched far and wide for the best ways to combat these critters.

View All Articles