PestControlLibrary
Menu

Black Soldier Fly

Hermetia illucens[11][12]

The black soldier fly is best known for its larvae: flat, leathery brown maggots that churn through wet food scraps, compost and manure, where they speed decomposition. The black adults look like wasps, but Utah State notes they lack working mouthparts and don't bite.[1][2][3]

Group
Insect
Order
Diptera
Family
Stratiomyidae
US records
39 states
Sources
12 cited
Updated
2026-11-13
Adult black soldier fly, a slender black wasp-like fly with smoky wings folded over its back, resting on a green leaf
Adult black soldier fly, a slender black wasp-like fly with smoky wings folded over its back, resting on a green leaf. (c) Peter Chen 2.0, some rights reserved (CC BY) — via iNaturalist, CC BY 4.0
On this page
  1. Identification
  2. Look-alikes
  3. Where it lives
  4. Biology
  5. Damage and signs
  6. Health risk
  7. Control
  8. Where the sources disagree
  9. Related profiles
  10. Common questions
  11. Sources

How to identify it

  • Adults are robust black flies, roughly 5/8 to 3/4 inch long, with smoky black wings held flat over the back at rest; see where the sources disagree on size.[2][1]
  • The first abdominal segment has clear, see-through patches, which is a quick way to recognize the adult.[2][1]
  • Mature larvae are about 1 inch long, legless, flattened and dark brown, with a tough, leathery skin and a small head narrower than the body.[1][2]
  • Young larvae are grayish white and very active before darkening as they mature.[2]

Look-alikes

Look-alikeHow to tell them apart
WaspsAdult soldier flies are often mistaken for black wasps. Oregon State says they don't bite, and Utah State says the adults lack working mouthparts and don't feed.[2][3]
House fly maggotsSoldier fly larvae are much tougher, flatter and darker, with a leathery skin; Texas A&M notes they can even survive for weeks in a jar without food or water.[1]

Where it lives

Found through much of the world; see where the sources disagree on where it came from. It is especially common where flies can reach wet, rotting food or garbage. GBIF has about 11,200 public U.S. records since 1990, most from California and Texas, followed by North Carolina and Virginia.[3][2][4]

US map: public records from 39 states since 1990 (GBIF).

Biology and life cycle

Larvae feed on decaying organic matter, including manure, food scraps and very moist, rotting vegetable material, and they are common in compost piles.[1][2]

Adults live only a few days (see where the sources disagree), in which they mate and lay eggs on moist organic matter. Utah State says females prefer thin, dark crevices near a food source.[2][3]

Fully grown larvae stop feeding and wander, sometimes several yards, looking for a drier place to pupate.[1]

Adults are sluggish until disturbed, may come to lights, and don't seem attracted to food.[1]

Because of their tropical origin they handle cold poorly: in Utah, mortality is high below about 50°F, and populations typically can't survive the winter outdoors.[3]

The larvae are farmed worldwide to turn food waste and manure into animal feed and soil amendments. A 2022 genetic study found that a North American lineage gave rise to almost all commercial stocks, which spread around the world partly through escapes from farms.[3][5]

Damage and signs

  • They cause no damage; in compost and manure the larvae speed decomposition and reduce volume and moisture.[2]
  • Their presence indoors usually points to a breeding source such as a poorly kept compost pile, spilled wet grain, a dead animal, or an old bee nest in a wall void.[1]

Health risk

Texas A&M and Oregon State describe soldier flies as decomposers and household nuisances. Medical case reports describe rare cases in which larvae were swallowed or got into skin: two larvae in the vomit of a 7-year-old girl in Malaysia (1995), a larva behind acute dysentery in a 2021 case report from Malaysia, and a single larva in a boil-like skin lesion of a Seattle woman who had traveled to East Africa (1995). A 2019 report of several larvae in a dog's intestinal tract in Argentina notes that the species can cause accidental intestinal myiasis in people and domestic animals.[1][2][6][7][8][9]

Control

Prevention

In compost, bury kitchen scraps well and cover them with 2 to 4 inches of dry, carbon-rich material such as leaves, dry grass or shredded paper.[2]

Keep them out

Cover holes in compost bins with window screen sealed in place with waterproof caulk to keep egg-laying adults out.[2]

Sanitation

Find and remove the breeding source, such as a poorly kept compost pile, spilled wet grain or other decaying vegetable matter, a dead bird or rodent in an attic or chimney, or an old bee nest in a wall void.[1]

Traps and physical control

If larvae get abundant, turn the pile and mix in dry material so it heats up; the larvae can't survive above 113°F.[2]

Indoors, pick up wandering larvae by hand or with a tissue and swat adults.[1]

Pesticides

If adults become numerous indoors, an aerosol insect spray containing pyrethrins will kill most of them.[1]

Where the sources disagree

Adult size: Oregon State gives about 5/8 inch; Texas A&M about 3/4 inch.[2][1]

Adult lifespan: Oregon State says adults live only about two days; Utah State says about six.[2][3]

Origin: Oregon State calls it a European insect now widespread in North America. Utah State says it originated in tropical and subtropical regions. A 2020 genetic study treats the species as New World in origin with strong evidence that it was introduced to Europe and Africa, and a 2022 study traces almost all commercial stocks to a North American lineage.[2][3][10][5]

Common questions

Are the big maggots in my compost bin bad for the compost?
No. Usually they are soldier fly larvae, which break down food scraps, and Oregon State notes they don't harm worms or their eggs in worm bins.[2]
Why are soldier fly larvae crawling across my floor?
Full-grown larvae leave their food source to find a drier spot to pupate. Look for a nearby source such as wet compost or spilled grain, a dead bird or rodent, or an old bee nest in a wall.[1]
Do black soldier flies bite?
Oregon State says they don't bite, even though they resemble wasps, and Utah State says the adults lack working mouthparts and don't feed.[2][3]
Is the black soldier fly native to North America?
Sources disagree. Oregon State calls it a European insect, while a 2020 genetic study treats it as native to the Americas and introduced to Europe and Africa, and a 2022 study traces almost all farmed stocks to a North American lineage.[2][10][5]

Sources

  1. Texas A&M AgriLife Extension Service, Insects in the City, “Soldier Flies (ENT-2005).” citybugs.tamu.edu/factsheets/household/flies-house/ent-2005/ (accessed 2026-11-13)
  2. Oregon State University Extension Service, “Soldier fly larvae: Beneficial compost helpers (July 2025).” extension.oregonstate.edu/news/soldier-fly-larvae-beneficial-compost-helpers (accessed 2026-11-13)
  3. Utah State University Extension, “Using Black Soldier Flies for Waste Processing (Hewitt and Miller).” extension.usu.edu/agwastemanagement/files/Black-Soldier-Flies-Waste-Management.pdf (accessed 2026-11-13)
  4. Global Biodiversity Information Facility (GBIF), “Hermetia illucens: occurrence records in the U.S., 1990-2026 (GBIF occurrence search).” api.gbif.org/v1/occurrence/search?taxonKey=1577153&country=US&hasGeospatialIssue=false&occurrenceStatus=PRESENT&year=1990%2C2026&facet=stateProvince&facetLimit=400&limit=0 (accessed 2026-11-13). Exact count at access: 11,204 U.S. records since 1990 (California 2,245; Texas 1,992; North Carolina 597; Virginia 595; Florida 565).
  5. BMC Ecology and Evolution, via PubMed Central, “What complete mitochondrial genomes tell us about the evolutionary history of the black soldier fly (Guilliet et al. 2022).” pmc.ncbi.nlm.nih.gov/articles/PMC9158166/ (accessed 2026-11-13). Cited from the abstract (PubMed 35650519).
  6. Malaysian Journal of Pathology, via PubMed, “A case of human enteric myiasis due to larvae of Hermetia illucens: first report in Malaysia (Lee et al. 1995).” pubmed.ncbi.nlm.nih.gov/8935136/ (accessed 2026-11-13). Cited from the PubMed abstract.
  7. Tropical Biomedicine, via PubMed, “Enteral myiasis causing acute dysentery: a case report (Amir et al. 2021).” pubmed.ncbi.nlm.nih.gov/33797537/ (accessed 2026-11-13). Cited from the PubMed abstract.
  8. Journal of Medical Entomology, via PubMed, “Human furuncular myiasis caused by Hermetia illucens (Adler and Brancato 1995).” pubmed.ncbi.nlm.nih.gov/7473633/ (accessed 2026-11-13). Cited from the PubMed abstract.
  9. Journal of Medical Entomology, via PubMed, “A rare case of pseudomyiasis in a dog by Hermetia illucens (Mulieri et al. 2019).” pubmed.ncbi.nlm.nih.gov/31237327/ (accessed 2026-11-13). Cited from the PubMed abstract.
  10. BMC Evolutionary Biology, via PubMed Central, “The puzzling mitochondrial phylogeography of the black soldier fly (Hermetia illucens) (Stahls et al. 2020).” pmc.ncbi.nlm.nih.gov/articles/PMC7247124/ (accessed 2026-11-13). Cited from the abstract (PubMed 32448128).
  11. Global Biodiversity Information Facility (GBIF), “Hermetia illucens (Linnaeus, 1758) (GBIF Backbone Taxonomy).” api.gbif.org/v1/species/1577153 (accessed 2026-11-13)
  12. iNaturalist, “Hermetia illucens taxon page (order and family).” www.inaturalist.org/taxa/82177 (accessed 2026-11-11)

Updated 2026-11-13. Built from sourced records. Spot an error? Tell us.