BackgroundThe fruit flyDrosophila melanogasterlives in natural habitats and has also long been used as a model organism in biological research. In this study, we used a molecular barcoding approach to analyse the airways microbiome of larvae ofD. melanogaster, which were obtained from eggs of flies of the laboratory strain w1118and from immune deficient flies (NF-kB-K), and from wild-caught flies. To assess intergenerational transmission of microbes, all eggs were incubated under the same semi-sterile conditions.ResultsThe airway microbiome of larvae from both lab-strains was dominated by the two familiesAcetobacteraceaeandLactobacillaceae, while larvae from wild-caught flies were dominated byLactobacillaceae, AnaplasmataceaeandLeuconostocaceae. Barcodes linked toAnaplasmataceaecould be further assigned toWolbachia sp., which is a widespread intracellular pathogen in arthropods. ForLeuconostoceae, the most abundant reads were assigned toWeissella sp.BothWolbachiaandWeissellaaffect the development of the insects. Finally, a relative high abundance ofSerratiasp. was found in larvae from immune deficient relish−/−compared to w1118and wild-caught fly airways.ConclusionsOur results show for the first time that larvae fromD. melanogasterharbor an airway microbiome, which is of low complexity and strongly influenced by the environmental conditions and to a lesser extent by the immune status. Furthermore, our data indicate an intergenerational transmission of the microbiome as shaped by the environment.Supplementary InformationThe online version contains supplementary material available at 10.1186/s40793-023-00506-9.