Things You'll Need
Carbon-rich organic materials
Sawdust is a high-carbon material that works particularly well at soaking up excess moisture in a compost bin. Add it or any other high-carbon material in small clumps so that they don't cause the organic materials to get too dense.
Monitor carefully the amount of high-nitrogen materials added to the compost bin. Maggots consume high-nitrogen material, including animal waste, vegetable peels and spoiled fruit. By limiting the amount of high-nitrogen materials in the compost pile, the maggots’ food source is reduced.
Adult soldier flies seek out exposed nitrogen-rich materials to lay their eggs so their young can have food to consume.
Wear gloves if you are transporting maggots from the compost bin to another location.
In addition to the millions of microscopic bacteria that decompose the organic waste in a compost bin, a variety of larger creatures helps produce the finished product, including soldier flies. Although beneficial to the composting process, soldier flies can lay eggs in the compost, producing maggots--also called larvae--which have the singular ability to disgust even the most enthusiastic composters. Grayish-white in appearance, soldier fly maggots are approximately an inch long and wriggle actively, especially when exposed to light. Since these maggots thrive on nitrogen-rich materials, one of the keys to eliminating them from your compost is maintaining a proper balance of carbon materials in the bin.
Check the moisture level of the compost bin. The aim for compost bin is for it to be the consistency of a wrung-out sponge. If the compost is dripping wet it's too moist.
Add carbon-rich materials such as shredded newspaper, cardboard, dead leaves, straw or old hay, to the compost bin to reduce the moisture level and to offset the amount of nitrogen materials.
Cover the nitrogen materials in your compost with at least 2 to 4 inches of carbon materials. Bury food scraps and other nitrogen-rich materials thoroughly in the bin.
Feed maggots in the compost bin to the birds to help control them. Dump the larvae in a location that is away from buildings so birds can easily find them.
Regan Hennessy has been writing professionally for 11 years. A copywriter and certified teacher, Hennessy specializes in the areas of parenting, health, education, agriculture and personal finance. She has produced content for various websites and graduated from Lycoming College with a Bachelor of Arts in English.