Getting rid of maggots

by Peter
(Camden NSW Australia )

We recently had a very hot day, temperature in excess of 40 degrees C, and my shade cloth cover for my worm farm became detached and was blown off and my worm farm was exposed to full sunlight and nearly all of my worms died.

When I opened my farm I was swarmed by flies and despite my attempts to shoo the flies away I now have maggots in my castings.

My question is, before I restock my worm farm should I...

a. Try to eliminate the castings infested by maggots?
b. Empty the worm farm and start from scratch?
c. Spray the castings with a domestic fly spray? ( If so what affect would this have on a future worm population?)
d. Ignore the maggots and restock? or
e. Has anyone an alternative suggestion?
I have tried to remove the decaying vegetable scraps to reduce the sustenance for the maggots.

Comments for Getting rid of maggots

Average Rating starstarstarstarstar

Click here to add your own comments

Dec 09, 2014
Maggots in a Worm Bin
by: Pauly

Also I would leave the worm bin "as is" and not get rid of anything. The maggot poop will be food for the worms and you will surely have some worm cocoons and babies in the bedding/castings.

Letting the maggots finish eating the kitchen scraps and letting them run there course will not hurt anything as they turn into adults quickly.

the worms will continue to eat the carbon bedding as the flies will not.


Dec 09, 2014
Getting Rid of Maggots In a Worm Bin
by: Pauly

Hi Peter,

Usually in these circumstances I tell people to just let nature take its course as long as your worms are still alive they will come back.

Flies/maggots are always an indication that there is too much kitchen scraps (nitrogen) in the mix.
There should be a mix of about 20:1 up to 40:1 Carbon:Nitrogen ratio.

Too much Nitrogen also means the bedding becomes too acidic and too moist. Flies love this type of environment.

Removing as much kitchen scraps as possible was good to do and adding some more moist carbon bedding like shredded paper, cardboard, dead leaves will help. Even some Minerals like lime and eggshells will help soak up the acid and moisture.

Stay away from and type of spray if it isn't natural. Using Diatomaceous Earth sprinkled on top of the bedding is a great deterrent to keep the flies from returning and laying anymore eggs.

You will have to wait for the cycle to run its course until the last fly cocoon hatches.

Hope this was helpful,

See my pages on unwanted pests below.
Worm Farming Pests

Oct 01, 2017
Great info
by: Rick Randazzo

I am new to the world of vermiculture and am amazed at how good it has been going for me. I moved my worm bins to the garden where it is full sun most of the day.

Yesterday was quite hot and today there were gobs of the funky things I guess are maggots.

They are grey and look like soft pill bugs. But after reading this post I realize my bedding is way too wet and has way too much green in it.

I'll add more cardboard and leaves and keep on with it.

Again I have to say how amazed I am at the amount of worms in just a few months.

Thanks for helping me out.

Jan 04, 2018
Grey Maggots in a Worm Bin
by: Pauly

Hello Rick Randazzo,

You mentioned you had grey maggots in your worm bin after moving them to the garden.

I'm assuming you had your worm bins inside, but after moving them to the garden, you now have the maggots.

You also mentioned your material contained a lot of greens. This all makes perfect sense.

The combination of a lot of greens and moving outdoors is a perfect storm for BSFL.

Black Soldier Fly Larvae love the rotting vegetation of kitchen scraps :)

They like a hot bed (or very warm bed) as well.

Lighten up on the kitchen scraps and add more moist carbon will help a lot. They are nothing to be concerned about unless they take over your worm bin.

Here is my page on the BSFL:

Black Soldier Fly Larvae


Jun 22, 2018
Thanks for this thread!
by: Alison

My 4 month old worm bin has been wonderful. I've kept it in my apartment and have had no problems until now when I have flies and maggots.

I still have worms fortunately, so I'll heed your suggestions to remove excess food scraps and add cardboard. I'm not exactly sure why the flies came - maybe I'd added too much food?

Anyway, thanks.

Feb 02, 2019
worms diminishing maggots increasing
by: Anonymous

I have had two worm farms going for years with no issues, suddenly, however, I have thousands thousands of hard skinned larvae of something - most likely flies - but the worms have nearly all vanished from the farms.

They are only in evidence as juveniles (small) way down on the worm casting level. I haven’t changed anything about the way I treat the worms.

Since the maggot invasion I have been adding more dry brown leaves and garden waste and leaving the kitchen scraps for a bit.

After two months of this, I am still losing worms and gaining maggots.

What kind of animals are these?!!

I haven’t seen any extra flies hovering about. Are they predating on the worms or just crowding them out?

I have a feeling I am going to have to start again with the populations from the very base of the farm.

I can’t even get our magpies interested in eating these maggots.

Any ideas??

Mar 17, 2019
worms diminishing, maggots increasing
by: Pauly

Hello Anonymous,

In order to really see what you're issue is, can you start a new thread and post a picture of your maggots?

This will help all of us understand the type of fly invading your bins. I'll get you through this :)

Thank you,

Jun 03, 2019
My problem too
by: DebT

Thank you for addressing this problem. I just discovered I have these also and now I know how to fix it. New to vermicomposting and really appreciate your advice.

Feb 15, 2020
Help! Maggots are taking over
by: First time composter

I’ve just started a worm farm for the first time. All seemed to be going well until I spotted some maggots in there.

I’ve tried manually removing handfuls of them and burying them in the garden but there’s so many. The soil seems quite moist and there is some rotting food in there now which I’m sure they’re loving.

My worms seem happy enough for now, but I think I need to do something to fix this ASAP. Would you suggest harvesting the worms and starting again? If so, how does one do this?!

Don’t want to kill my worms but can’t think how to separate them....

Feb 16, 2020
Maggots in Worm Bin
by: Pauly

Hello, First Time Worm Composter,

It doesn't sound like you have too much of an issue if your worms aren't trying to escape or are dying off.

However, I'm not sure if you have your worm bin inside or outside.

I CAN tell you that the #1 food source the flies are going for is the nitrogen foods or "kitchen scraps" within the worm system.

The best thing you can do to get rid of maggots in the worm bin is too:

1. Continue to remove the maggots (only if it's feasible to).

2. Remove any large chunks or pockets of kitchen scraps (nitrogen). Watch for tiny pink baby worms and tan to brown worm cocoons.

3. Add more carbon bedding to the worm bin along with a suitable mineral, such as, finely-ground eggshells or agricultural lime (about 1 to 2 tablespoons per 1 sq. ft. area).

If your worm bin is too moist, add dry bedding. If your worm bin is too dry (which I doubt this) add moist, not wet carbon bedding.

Carbon material for the worm bin can include shredded brown paper or cardboard. Because of the nature of your situation the finer you can shred, cut, tear, etc. the better.

This will help soak up any acidic areas that are attracting the flies. Stay away from peat moss if your using it for now. Peat moss will have higher acidic amounts than paper/woody products.

4. Let the process work.

You'll need to allow the maggot cocoons to hatch and the rest of any nitrogen food sources to compost before adding any more in the future.

Remember, carbon is STILL worm food and the minerals will be enormously beneficial.

5. After it's safe to add kitchen scraps to the worm bin again, only feed what you think the worms can keep up with and bury it well under the carbon bedding in a a couple or a few pockets.

1 pound of worms can only handle a couple of handfuls of kitchen scraps per feeding.

When you see the scraps nearly gone or composted completely, add more kitchen scraps under the carbon bedding/worm castings again.

Get to understand your feeding regiment up until it's time to harvest your worm castings, then start over again and only feed the worms foods they can keep up with.

One thing I discuss in The Worm Farming Revolution book is 19 minerals including one known as Diatomaceous Earth, as well as several pests in the worm bin.

I've been using this for 10 years in the worm bin. If you'll be worm farming outdoors, this is a great fly/insect killer or deterrent.

Sprinkle on top of the bedding like powdered sugar to a funnel cake.

Learn more about Diatomaceous Earth in the worm bin.

Learn more about The Worm Farming Revolution book.

Thank you and I hope this will help you and others with maggots in the worm bin,

Click here to add your own comments

Join in and write your own page! It's easy to do. How? Simply click here to return to Worm Farming Questions.