• Loading metrics

The power of poop: Defecation behaviors and social hygiene in insects

  • Marissa E. Cole,

    Affiliation Department of Entomology and Plant Pathology, North Carolina State University, Raleigh, North Carolina, United States of America

  • Javier A. Ceja-Navarro,

    Affiliations Joint BioEnergy Institute, Emeryville, California, United States of America, Bioengineering and Biomedical Sciences Department, Biological Systems and Engineering Division, Lawrence Berkeley National Laboratory, Berkeley, California, United States of America, Institute for Biodiversity Science and Sustainability, California Academy of Sciences, San Francisco, California, United States of America

  • Aram Mikaelyan

    Affiliation Department of Entomology and Plant Pathology, North Carolina State University, Raleigh, North Carolina, United States of America

The power of poop: Defecation behaviors and social hygiene in insects

  • Marissa E. Cole, 
  • Javier A. Ceja-Navarro, 
  • Aram Mikaelyan

Feeding and defecation are necessary biological processes. Although the main purpose of defecation is waste elimination, it has also had a profound influence on the evolution of animal behavior and ecological interactions. Due to the capacity of fecal material to support the growth of microbes, including potential pathogens, defecation has direct consequences on animal health. To counter these risks, insects have evolved a range of unique behavioral and physiological adaptations, often involving microbial symbionts; these adaptations are particularly important for social insects, which are at an especially increased risk of fecal exposure and associated disease due to more crowded living conditions and high site fidelity.

Insects practice “fecal” distancing

Because feces is rich in organic matter, it can be an effective disease reservoir [1]. The risk of feces-related disease is more pronounced in species with high site fidelity, living in close quarters with each other and/or their feces [1]. Honey bees, for example, go for “cleansing flights” (Fig 1) and defecate exclusively outside of the hive [2]. Several species of caterpillars, which live in stationary leaf shelters, have also evolved behaviors such as “ballistic frass ejection,” shooting fecal pellets (Fig 1) to remarkable distances, successfully avoiding accumulation of fecal material and subsequent need for removal [3]. While feces avoidance mostly seems to benefit invertebrates by preventing disease, it is not the only benefit—predatory and parasitic wasps seem to have the ability to use volatile chemicals from frass to locate their host species [4,5], and some lepidopteran and coleopteran species have shown oviposition avoidance in areas that have been treated with feces-associated volatiles of their own species and that of others, potentially saving their offspring from future competition [6,7].

Fig 1. A summary of the diversity of defecation behaviors found among eusocial [ants (1), termites (2), and bees (3)], subsocial [earwigs (4), bark and ambrosia beetles (5), passalid beetles (6), and wood roaches (7)], and solitary insects [caterpillars (8), longhorn beetles (9), and leaf beetle larvae (10)].

Not all the behaviors are necessarily found in a given species within each group. Most insect species minimize pathogen risk by reducing their exposure to feces, but several social insects that are forced to live in close proximity to feces instead do so by minimizing the pathogen growth in feces. The presence of antimicrobial compounds in insect feces appears to have enabled the evolution of behaviors in insects that require an intimate contact with feces, such as its use in nest building, the use of fecal shields to avert predators.

With the evolution of subsociality and eusociality came an increased exposure to fecal material due to living in large groups of individuals in a localized area. In response to increased likelihood of contracting pathogens, a wide range of hygienic behaviors evolved, which are specific to social insects: “social immunity,” a set of behavioral adaptations enabling insects to collectively prevent infection, including waste removal, grooming, cannibalism, undertaking, and maintaining “latrines” outside of nests [1,8]. For instance, Myrmica rubra worker ants, despite an increased risk of exposure to pathogens, remove more waste upon detection of pathogenic fungal conidia on feces when brood are present [9].

Sociality and beneficial relationships with feces

Although it may seem paradoxical, several behaviors in insects have simultaneously evolved keeping individuals closer to fecal material. Pyralid moth larvae [10], some bark beetles [11,12], and termites [13] use frass to build their dwellings (Fig 1). Dark garden ants maintain fecal patches around the nest referred to as “kitchen middens,” which are not cleared out with other waste and are presumably treated by ants to limit microbial growth [14]. Additionally, ambrosia beetles, known for farming “ambrosia fungi,” may be provided essential elements by their obligate fungal symbiont through the recycling of fecal material (Fig 1), with the highest concentrations of essential elements found to be positively correlated with the beetle’s level of sociality [15]. This correlation suggests that ambrosia beetles may benefit nutritionally from being more social and in closer association with a higher volume of feces.

Some leaf beetles in the family Chrysomelidae produce “fecal shields,” which serve as physical protection but are also fortified with plant-derived metabolites such as steroidal alkaloids, saponins, an array of fatty acids, and phytol, which have been suggested to play a role in deterring predators [16]. Although chrysomelid fecal shields serve as physical and chemical barriers against predators (Fig 1), many of the aforementioned metabolites also have demonstrable antimicrobial properties [2]. Regardless of the degree of contact, it is reasonable to assume that all behaviors involving close contact with feces must have evolved alongside mechanisms to regulate pathogen growth, which may rely on components derived from the diet or gut microbiome.

Protected by poop: The use of feces for nest sanitation and gut health

Evidence for antimicrobial benefits of feces comes primarily from social insects, first demonstrated in the termite Zootermopsis angusticollis, where fecal matter was shown to have a dose-dependent inhibitory effect on spore germination in the entomopathogenic fungus Metarhizium anisopliae [17]. In addition, protozoans in the gut of Z. angusticollis synthesize enzymes targeting the predominant polysaccharide in the fungal cell wall, indicating potential for digestion of fungi and/or protection from fungal pathogens [18]. A similar effect was later observed with feces from the subsocial wood roach Cryptocercus punctulatus (Fig 1), where it was proposed that the active antifungal components were likely of microbial origin [19]. Given that termites and wood roaches are sister clades, this apparent defensive role of the fecal microbiome likely emerged in their common ancestor. Antimicrobial properties have also been discovered in earwig excrement [20] and passalid beetles (Fig 1) [21], indicating that taxonomically widespread lineages of social insects have evolved similar strategies to inhibit pathogen growth. Antimicrobial effects of fecal microbiomes in social insects could be attributed to microbes colonizing the diet, surviving gut passage, and producing secondary metabolites in feces or those colonizing and selectively growing in feces.

Many social insects commonly engage in trophallaxis (Fig 1; exchange of gut fluids between individuals) and coprophagy (consumption of feces), which may allow sharing of microbiomes and metabolites among nestmates. Although these behaviors primarily serve nutritional roles, the potential antimicrobial role of feces in nest hygiene has been suggested to be an additional incentive for their selection in social insects [20]. Moreover, although mechanisms of pathogen inhibition by gut microbiomes are different from that of fecal microbiomes, gut communities have been suggested to play roles in preventing germination of fungal spores in guts of locusts [22] and termites [23]. It is therefore possible that coprophagy (Fig 1) evolved to “treat” feces by passing it through the intestinal tract to neutralize potential pathogens. Inoculation of individuals with fecal microbiome members could also have a function in preventing disease. In bumblebees, for example, the consumption of feces from healthy individuals has been shown to reduce parasite loads of Crithidia bombi [24,25]. Coprophagy has been suggested to play a similar role in social immunity of the European earwig [20], although the exact microbiome contributions to antimicrobial properties of its feces remain unclear and need more investigation.

Weaponized poop: Antimicrobial potential of feces

Multiple insect species rely on wood as a source of food and shelter, although this means living in close quarters with nestmates and other species inside damp galleries within decaying logs. The conditions within decaying wood potentially amplify the risk of pathogen breakouts and impose selective pressures for evolution of the fecal microbiome’s role in social immunity. The microbiological and chemical bases of feces-mediated defenses have been best dissected for actinobacteria in the subsocial wood-feeding beetle, Odontotaenius disjunctus, with similar roles suggested for strains isolated from guts of fungus-cultivating termites [21,26]. Feces-associated Actinomycetes collected from various populations of the beetle across the United States were observed to collectively produce a rich cocktail of antimicrobial metabolites from multiple families (Fig 1) [21]. In vitro inhibition assays with the isolated actinobacterial strains demonstrated a strong ability to inhibit M. anisopliae [21].

Gut and fecal microbiomes of wood-feeding larvae of the longhorn beetle Cerambyx welensii harbor multiple actinobacterial strains producing a wide range of antimicrobial compounds (Fig 1), including several with broad ranges of bioactivities against potential pathogens [27]. Antifungal properties of fecal isolates from the herbivorous rhinoceros beetle Allomyrina dichotoma [28] and bark beetle Dendroctonus rufipennis (Fig 1) [29] suggest that actinobacteria might play a wider role in reducing pathogen load in gut microbiomes of lignocellulose-feeding beetles. Finally, in the Eastern subterranean termite, Reticulitermes flavipes, actinobacteria have been found in feces-lined galleries, surrounding soils, and on the termite cuticle; considering the occurrence of grooming and coprophagy in termites, it is possible that actinobacteria are cycled throughout the colonies and nests themselves [30]. The subterranean termite pest, Coptotermes formosanus, may also be provided with disease resistance by actinobacteria associated with their fecal comb nests [31]. Incidentally, multiple species of fungus-feeding termites have also been found to be associated with actinobacterial strains encoding a wide array of novel biosynthetic gene clusters as well as putative chitinases postulated to play a protective role against microbial pathogens [26,32].

Future work

Social immunity is a burgeoning field; we are only beginning to understand ecological roles and microbial bases of some hygienic defecation behaviors in insects. Studying the composition and functional potential of fecal microbiomes, especially from wood-feeding insects, holds considerable promise to not only better our understanding of the biology of insects, but also to the isolation of microbial strains with novel bioactive capabilities. Future work should clarify the extent to which diet and sociality of insect lineages play a role in determining the antimicrobial properties of feces and explore the ecological and evolutionary patterns among not just intestinal, but fecal microbiomes as well.


Comments from Dr. Christine Nalepa improved the manuscript.


  1. 1. Weiss MR. Defecation behavior and ecology of insects. Annu Rev Entomol. 2006;51:635–61. pmid:16332226
  2. 2. Copley TR, Giovenazzo P, Jabaji SH. Detection of Nosema apis and N ceranae in honeybee bottom scraps and frass in naturally infected hives. Apidologie. 2012;43:753–60.
  3. 3. Weiss MR. Good housekeeping: why do shelter-dwelling caterpillars fling their frass? Ecol Lett. 2003;6:361–70.
  4. 4. Giunti G, Campolo O, Caccamo P, Laudani F, Palmeri V. Volatile Infochemicals from Rhyzopertha dominica Larvae and Larval Feces Involved in Theocolax elegans Host Habitat Location. Insects. 2021;12. pmid:33562256
  5. 5. Pietrantuono AL, Moreyra S, Lozada M. Foraging behaviour of the exotic wasp Vespula germanica (Hymenoptera: Vespidae) on a native caterpillar defoliator. Bull Entomol Res. 2018;108:406–12. pmid:28925338
  6. 6. Molnár BP, Tóth Z, Kárpáti Z. Synthetic blend of larval frass volatiles repel oviposition in the invasive box tree moth, Cydalima perspectalis. J Pest Sci. 2017;90:873–85.
  7. 7. Agarwala BK, Yasuda H, Kajita Y. Effect of conspecific and heterospecific feces on foraging and oviposition of two predatory ladybirds: role of fecal cues in predator avoidance. J Chem Ecol. 2003;29:357–76. pmid:12737263
  8. 8. Cremer S, Pull CD, Fürst MA. Social Immunity: Emergence and Evolution of Colony-Level Disease Protection. Annu Rev Entomol. 2018;63:105–23. pmid:28945976
  9. 9. Pereira H, Jossart M, Detrain C. Waste management by ants: the enhancing role of larvae. Anim Behav. 2020;168:187–98.
  10. 10. Doerksen GP, Neunzig HH. Biology of some immature Nephopterix in the Eastern United States (Lepidoptera: Pyralidae: Phycitinae) 1. Ann Entomol Soc Am. 1976;69:423–31.
  11. 11. Furniss MM. Biology of Dendroctonus punctatus (Coleoptera: Scolytidae). Ann Entomol Soc Am. 1995;88:173–82.
  12. 12. Furniss MM, Kegley SJ. Biology of Pityophthorus pulchellus tuberculatus (Coleoptera: Curculionidae: Scolytinae) in Lodgepole Pine in Northern Idaho. Environ Entomol. 2018;47:775–80. pmid:29684097
  13. 13. Cosarinsky MI. Nest Micromorphology of the Termite Cortaritermes fulviceps in Different Types of Soils. Soc Forces. 2004;44:153–70.
  14. 14. Czaczkes TJ, Heinze J, Ruther J. Nest Etiquette—Where Ants Go When Nature Calls. PLoS ONE. 2015;10:e0118376. pmid:25692971
  15. 15. Lehenberger M, Foh N, Göttlein A, Six D, Biedermann PHW. Nutrient-Poor Breeding Substrates of Ambrosia Beetles Are Enriched With Biologically Important Elements. Front Microbiol. 2021;12:664542. pmid:33981292
  16. 16. Theis N, Lerdau M. The Evolution of Function in Plant Secondary Metabolites. Int J Plant Sci. 2003;164:S93–S102.
  17. 17. Rosengaus RB, Guldin MR, Traniello JFA. Inhibitory Effect of Termite Fecal Pellets on Fungal Spore Germination. J Chem Ecol. 1998;24:1697–706.
  18. 18. Rosengaus RB, Schultheis KF, Yalonetskaya A, Bulmer MS, DuComb WS, Benson RW, et al. Symbiont-derived β-1,3-glucanases in a social insect: mutualism beyond nutrition. Front Microbiol. 2014;5:607. pmid:25484878
  19. 19. Rosengaus RB, Mead K, Du Comb WS, Benson RW, Godoy VG. Nest sanitation through defecation: antifungal properties of wood cockroach feces. Naturwissenschaften. 2013;100:1051–9. pmid:24271031
  20. 20. Diehl JMC, Körner M, Pietsch M, Meunier J. Feces production as a form of social immunity in an insect with facultative maternal care. BMC Evol Biol. 2015;15:40. pmid:25888183
  21. 21. de Cassia Pessotti R, Hansen BL, Reaso JN, Ceja-Navarro JA, El-Hifnawi L, Brodie EL, et al. Multiple lineages of Streptomyces produce antimicrobials within passalid beetle galleries across eastern North America. Elife. 2021;10. pmid:33942718
  22. 22. Dillon RJ, Charnley AK. Inhibition of Metarhizium anisopliae by the gut bacterial flora of the desert locust, Schistocerca gregaria: Evidence for an antifungal toxin. J Invertebr Pathol. 1986:350–60.
  23. 23. Chouvenc T, Su N-Y, Robert A. Inhibition of Metarhizium anisopliae in the alimentary tract of the eastern subterranean termite Reticulitermes flavipes. J Invertebr Pathol. 2009;101:130–6. pmid:19426734
  24. 24. Näpflin K, Schmid-Hempel P. High Gut Microbiota Diversity Provides Lower Resistance against Infection by an Intestinal Parasite in Bumblebees. Am Nat. 2018;192:131–41. pmid:30016168
  25. 25. Koch H, Schmid-Hempel P. Socially transmitted gut microbiota protect bumble bees against an intestinal parasite. Proc Natl Acad Sci U S A. 2011:19288–92. pmid:22084077
  26. 26. Murphy R, Benndorf R, de Beer ZW, Vollmers J, Kaster A-K, Beemelmanns C, et al. Comparative Genomics Reveals Prophylactic and Catabolic Capabilities of Actinobacteria within the Fungus-Farming Termite Symbiosis. mSphere. 2021;6. pmid:33658277
  27. 27. Santamaría RI, Martínez-Carrasco A, de la Nieta Sánchez R, Torres-Vila LM, Bonal R, Martín J, et al. Characterization of Actinomycetes Strains Isolated from the Intestinal Tract and Feces of the Larvae of the Longhorn Beetle Cerambyx welensii. Microorganisms. 2020;8. pmid:33339339
  28. 28. Lee H-W, Ahn J-H, Kim M, Weon H-Y, Song J, Lee S-J, et al. Diversity and Antimicrobial Activity of Actinomycetes from Fecal Sample of Rhinoceros Beetle Larvae. Korean J Microbiol. 2013;49:156–64.
  29. 29. Hulcr J, Adams AS, Raffa K, Hofstetter RW, Klepzig KD, Currie CR. Presence and Diversity of Streptomyces in Dendroctonus and Sympatric Bark Beetle Galleries Across North America. Microb Ecol. 2011:759–68. pmid:21249352
  30. 30. Aguero CM, Eyer P-A, Crippen TL, Vargo EL. Reduced Environmental Microbial Diversity on the Cuticle and in the Galleries of a Subterranean Termite Compared to Surrounding Soil. Microb Ecol. 2021:1054–63. pmid:33399932
  31. 31. Chouvenc T, Efstathion CA, Elliott ML, Su N-Y. Extended disease resistance emerging from the faecal nest of a subterranean termite. Proc Biol Sci. 2013;280:20131885. pmid:24048157
  32. 32. Li J, Sang M, Jiang Y, Wei J, Shen Y, Huang Q, et al. Polyene-Producing Streptomyces spp. From the Fungus-Growing Termite Macrotermes barneyi Exhibit High Inhibitory Activity Against the Antagonistic Fungus Xylaria Front Microbiol. 2021;12:689. pmid:33868208