CORVALLIS, Ore. – Most people shudder when they see maggots in their bin composter or compost pile. They may be startling in their appearance and movement, but they won’t hurt you or the compost. In fact, they play a role in breaking down plant and animal tissues.
Often, these maggots are the larval life stage of compost-dwelling soldier flies, according to Linda Brewer, Oregon State University Extension Service soil scientist. This European insect (Hermetia illucens) is found everywhere in North America. They are especially common where flies access wet, rotting food sources or garbage.
Young soldier fly larvae are a gray-white color, segmented, about 1 inch in length and very active. As they mature, the larvae turn a dark brown color, are torpedo-shaped and flattened, with tough-looking skin. The head is small and narrower than the body. The body features only hairs and spines – no legs. The rear of the body is blunt and houses breathing pores or spiracles.
When the larvae pupate, or if they die before transitioning to the adult stage, the chitin – a component in their leathery skin – will decompose and contribute nitrogen and glucose to the compost. Decomposer bacteria benefit from both nutrients, Brewer said.
Adult soldier flies are black and about 5/8-inch long. Their smoky black wings are held over the back when at rest and the first abdominal segment has clear areas. Adults feed and lay eggs on food waste and other moist types of organic matter.
Adult soldier flies emerge, mate and die within two days. The dark-colored adults are often mistaken for black wasps, but they don’t bite or carry disease, Brewer said.
Soldier fly larvae are voracious consumers of high nitrogen materials such as kitchen food scraps and manures, as they decay. They break down organic material in manure or compost piles. These materials are further decomposed by smaller members of the decomposer community. The adult flies can inoculate the compost with beneficial decomposer bacteria and fungi from other sources.
Soldier flies rarely invade houses, unless a compost pile is close to the structure, Brewer said. They are almost exclusively found in compost bins, or juicy sheet mulches and manure piles. In the southeastern United States, they are used to reduce the volume of hog manure.
In addition to reducing manure volume, soldier fly larvae also reduce moisture and stabilize plant nutrients from the manure in their own bodies.
Soldier fly females lay eggs on the surface of exposed nitrogen-rich material. Incorporating sufficient leaves, dry grass, shredded paper and other organic "brown" material in the pile to cover any nitrogen food sources is a sure way to avoid attracting the egg-laying females. Kitchen waste incorporated into any home compost pile should be well-buried in the pile and covered with two to four inches of dry, absorbent materials, according to Brewer.
If your food-rich compost has many soldier fly larvae, you can reduce their numbers by turning the compost and layering in dry materials. The presence of soldier fly larvae indicates that the compost is very moist. Water has a tremendous capacity to absorb heat without changing its temperature. The additional dry materials and turning will encourage the compost pile to heat up. Soldier fly larvae cannot tolerate temperatures above 113 degrees Fahrenheit – easy enough to achieve in a well-balanced compost pile.
You can further discourage these flies by covering any holes in the compost bin with window screen glued down with exterior household or other waterproof caulk to exclude adult flies looking for good sites to lay their eggs.
Soldier fly larvae can thrive in worm bins, as well, where they may out-compete the worms for food sources.
In a worm bin, bury food scraps deeply in the worm bedding and cover well. Soldier flies may eat what is on the surface, but they won't eat the worms or their eggs.
Birds love high-protein soldier fly larvae, Brewer said. Larvae can be removed from the compost pile and fed to the chickens or just tossed on the ground where birds can find them.
About the OSU Extension Service: The Oregon State University Extension Service shares research-based knowledge with people and communities in Oregon’s 36 counties. OSU Extension addresses issues that matter to urban and rural Oregonians. OSU Extension’s partnerships and programs contribute to a healthy, prosperous and sustainable future for Oregon.