Maggots in a worm bin can be alarming, but in most cases they’re black soldier fly larvae (BSFL), not the house fly maggots you’d find in a trash can. Soldier fly larvae are harmless to worms and people, and they’re actually excellent composters. In warm weather, though, they can multiply quickly and crowd out your worms.
This guide helps you identify the grubs in your bin, decide whether to keep them, and stop them taking over.
Quick answer
- Most “maggots” are black soldier fly larvae: flat, segmented, grey-brown, up to 2.5 cm (1 in).
- They don’t harm worms and don’t spread disease.
- They thrive in warm, wet, food-rich bins, often outdoors.
- Manage them: reduce food, cover the surface, seal gaps, remove larvae by hand or with bait.
Identifying the grubs
Black soldier fly larvae
- Flat, tough, segmented bodies
- Cream when young, turning grey-brown as they mature
- Up to about 2.5 cm (1 in)
- Move in groups, often churning food
- Adults are slim, black, wasp-like flies that don’t bite or sting and don’t visit kitchens
House fly or blow fly maggots
- Smooth, white, soft and tapered at one end
- Usually around meat, fish or very rotten food
- Adults are the familiar buzzing house flies
If you find house fly maggots, there’s probably meat, fish or another protein source in the bin. Remove it. See foods to never feed worms.

Are soldier fly larvae bad for worms?
Not directly. They don’t eat worms. But they are voracious eaters and can consume food faster than worms, generating heat and moisture as they go. In large numbers, they can make a bin wet, warm and crowded, and worms may move away.
Some worm keepers welcome them in outdoor bins as extra composting power, and soldier fly larvae are even raised as chicken feed.

Related guideWorm Predators: What Eats Worms in a Bin and How to Stop ThemWhy maggots in a worm bin appear
- Warm weather. Soldier flies are most active in warm months and warm climates.
- Lots of wet food, especially fruit and vegetable scraps left near the surface.
- Gaps in the lid or holes big enough for flies to lay eggs nearby. Female soldier flies lay eggs in cracks near rotting material.
- Outdoor bins. Indoor bins rarely get soldier flies.
How to manage maggots in a worm bin
- Feed less. Larvae boom when food is abundant.
- Bury food deeper and cover the surface with damp cardboard or burlap.
- Screen air holes and gaps with fine mesh so adult flies can’t lay eggs near the bedding.
- Remove larvae by hand. Scoop them out when they gather on food. Offer them to chickens, birds or fish, or put them in an outdoor compost heap.
- Use bait. Leave a pile of soft food on a tray on the surface overnight; larvae gather there and can be removed together.
You don’t need to eliminate them completely. Bringing numbers down so worms have room is enough.
When larvae leave by themselves
Mature soldier fly larvae (dark grey-brown) leave the food to find a dry place to pupate. You might find them crawling out of the bin or up the walls. This is normal. A bin lid with a lip stops them escaping into your home.
Preventing soldier fly larvae
- Keep outdoor bins well sealed with fine mesh over vents.
- Avoid overfeeding in hot weather.
- Bury all food and keep a cover sheet on top.
- Don’t leave food scraps sitting outside the bin.
- Move bins indoors or into a garage in peak summer. See keeping a worm bin cool.
A one-week plan for a larvae outbreak
- Day 1: scoop out masses of larvae and soft food they’re gathered on. Add dry cardboard.
- Day 2: check vents and gaps; tape fine mesh over any openings.
- Days 2–5: set a bait tray of soft food on the surface each evening and remove it with larvae each morning.
- Day 5: feed a small meal, buried deep and covered with damp cardboard.
- Day 7: most remaining larvae should be mature and leaving. Keep the lid on and the surface covered.
Maggots in a worm bin usually become less of an issue as summer ends and adult flies stop laying eggs.
Should you keep them?
If your bin is outdoors and you produce a lot of food waste, a moderate soldier fly population can be helpful. They’re very effective at processing scraps quickly, and their activity leaves food softened for worms. Just make sure they don’t take over entirely. If your main goal is worm castings, keep larvae numbers low.
Further reading: Oregon State University Extension’s Composting with Worms (EM 9034) mentions soldier fly larvae among bin visitors, and the US EPA’s Composting at Home page explains keeping meat out to avoid house fly maggots in a worm bin.
Frequently asked questions
Are soldier fly larvae dangerous?
No. They don’t bite, sting or spread disease, and adults don’t come into kitchens.
Will soldier fly larvae eat my worms?
No. They compete for food but don’t eat worms.
Why are maggots crawling out of my bin?
Mature soldier fly larvae leave to find a dry place to pupate. Keep a lid on.
How do I get rid of house fly maggots?
Remove any meat, fish or rotting protein, add dry carbon and cover the bin securely.


