Frontiers for Young Minds

Frontiers for Young Minds
Core Concept Biodiversity Published: February 16, 2023

What Can Fruit Flies Tell Us About an Environment?


Fruit flies are very small flies. When people find them in their kitchens, they are often annoyed. However, fruit flies can tell us about what is happening in nature. Some fruit flies are native to an area, whereas others have been introduced by people. When a place is in its natural state, native species of fruit flies are abundant. When a place has been changed, for example, by the construction of lots of buildings, invasive species of fruit flies are found. Fruit flies are an indicator species that can tell us about how land use has changed.

Animals in a Changing World

Humans change planet Earth in ways that affect the plants and animals living on it. Climate change is one example and land use is another. Land may be converted from a countryside (a rural environment) to a city (an urban environment). The animals we see in various environments can reflect the changes in land use. If one animal species is only found in the countryside and another is found only in the city, these animals can be indicator species, meaning they can indicate that land use is changing or has changed.

Fruit flies can be indicator species. During the summer, you may find these tiny flies in your kitchen. They are known by their scientific name, Drosophila. While only a couple of species of Drosophila are commonly found in kitchens, outside you might find tens to hundreds of Drosophila species—but it depends on where you live. The species, and their numbers, differ if you are in the city or the country.

Why Do Animals Live Where They Live?

To understand why animals live where they do, we need to understand the concept of a niche. An animal’s niche includes the climate and foods that match the animal’s needs. Animals do not do well in environments that do not contain their niche. Cities provide different niches than natural environments do. Cities have plants in parks and gardens. However, people sometimes like to have non-native or exotic plants near their homes. When native plant species disappear, niches for animals also disappear. When this happens, native species may be replaced by non-native species, which are species introduced by humans into a region that is not their natural environment. If the number of individuals of a non-native species grows large, the non-native species may become an invasive species. An invasive species may outcompete native species that have a similar niche.

Animals can be split into two groups: generalists and specialists (Figure 1). Specialists have specific niche requirements, particularly for food. Generalists can find food from many sources, thus, it is easy for them to survive. Invasive animals are often generalists. If native plants are replaced with exotic plants, then the native specialist insects may disappear because their food has disappeared. Specialists cannot invade an area that lacks its food or niche.

Figure 1 - The difference between a generalist and a specialist.
  • Figure 1 - The difference between a generalist and a specialist.
  • Each stack of blocks represents food that is eaten by an animal. The generalist eats four types of food whereas the specialist only eats one type of food. Both animals eat the same amount. If the blue food disappears, then the specialist will have nothing to eat. The generalist will still be able to find food.

The types of animals in an area reflect the species diversity of the area. Species diversity is measured by taking into account the number of species present and the number of individuals present (Figure 2). Rural areas, although natural, may have low diversity because only specialists live there. Urban areas may have low diversity because only generalists are there. Diversity may be highest in the suburbs, where both specialists and generalists may live.

Figure 2 - Four species of flies are found in both areas.
  • Figure 2 - Four species of flies are found in both areas.
  • In the rural area, there are two individuals of each species. In the urban area, most flies are from one species. Although each area has the same number of species, the rural area is more diverse than the urban area because one species does not dominate. The species found only in the urban area is likely an invasive generalist and the species found only in the rural area is likely a specialist. The urban area has more flies because invasive species are so common.

What About Fruit Flies?

These diversity patterns are seen in Drosophila species. Researchers collect Drosophila species using traps baited with rotting bananas. In Brazil, Drosophila flies were collected along an urban gradient, which is a slow change from a rural environment to a city across a geographical area [1]. The researchers sampled four environments (Figure 3): a rural area, a low city-growth area, a medium city-growth area, and an urban area. The rural area had more native than invasive fly species. The medium city-growth area and the urban area had more invasive flies than native flies—the opposite of what was seen in the rural area.

Figure 3 - An urban gradient.
  • Figure 3 - An urban gradient.
  • At the left is the most rural area, which does not have any buildings and only native plants. As you move from left to right, the number of buildings increases and the number of plants decreases. Native plants are also gradually replaced by exotic plants.

In Brazil, the low city-growth area had the most fruit fly species and the rural area had the least. The variety of food plants available in the low city-growth area was probably greater than in any of the other areas studied. The low city-growth area is like the suburbs. The plant species there is likely a mixture of native and exotic species. In the urban area, the number of fruit fly species was lower than in the low city-growth area. The different food plants along the gradient changed which fruit fly species were found.

The most common species was different between the rural and urban areas. In the rural area, the native species Drosophila willistoni and Drosophila paulistorum were the most frequently collected. In the urban area, those species were rarely found. The most common species in the urban area were Drosophila simulans and Zaprionus indianus; they made up more than half of the flies in the urban area, but only a tiny fraction of the rural flies were seen. Both of these species are native to Africa and invasive in Brazil. Both Drosophila simulans and Zaprionus indianus are generalist species. Thus, in Brazil, the urban area had invasive species and the countryside had native species.

The numbers and types of species do not show the whole picture. Diversity is also reflected in the number of individuals spread among the species. The total number of flies was highest in the urban area and lowest in the rural area. Although more flies were in the urban area, it was not the most diverse because most were only a couple of species. Diversity was highest in the low city-growth and medium city-growth areas because they were not dominated by few species, as in the urban area.

Do These Patterns Happen Elsewhere?

A similar pattern was seen in North America—in Alabama, USA [2]. Flies were collected in three locations: around buildings with no plants, in an urban park, and in a rural park. Around the buildings, the researchers found the smallest number of species and they did not find two of the native species found in the other areas. The greatest number of individuals was found in the urban park.

Fly species also changed over time. The researchers compared the flies collected in the 2010s with flies collected 100 years earlier. In Alabama, cities have grown while farmland has shrunk. At the same time, climate change has altered the environment. The fruit fly collections in the 2010s had fewer species compared with those from the 1910s. Many species in the 2010s were not present in the 1910s collection, and all the new species are invasive. One of the new species found in the 2010s was Zaprionus indianus, which is an invasive species in the USA like it is in Brazil. Changes in fly species indicate both land-use change and climate change.

Our lab collected Drosophila from two rural orchards in Kansas in 2014, and we made similar observations. Our collections had species different from those found in Kansas in 1954 [3]. Similar to the Alabama study, we found fewer species in 2014 compared with 1954. We also found more invasive species. Notably, the invasive species Drosophila simulans was rare in 1954, but it made up more than half of our collection in 2014. The orchards were about 10 miles from a city so, even in a rural area, the invasive species is now thriving.

We found another invasive species new to North America: Drosophila suzukii. This species was also found in Alabama. We did not find Zaprionus indianus in 2014, but we found it in 2012 and 2015, thus, we know that it has been successful at invading Kansas. Kansas is relatively rural, and the presence of invasive species indicates that the environment is changing here as well.

Do Fruit Fly Species Reflect Environmental Change?

Researchers found that the types and numbers of fruit fly species are different now than they were almost 100 years ago. Fruit flies also vary with land use. The generalist species Zaprionus indianus and Drosophila simulans are replacing native species in urban places. Measuring environmental change is difficult, but the fruit fly species found in an area can indicate how rural or urban an area is and if an area is changing over time.


Indicator Species: A species whose numbers or presence is heavily influenced by the environment.

Niche: The place in which an animal (or plant) survives the best because of the availability of food and/or shelter, as well as favorable climate conditions.

Native Species: A naturally occurring plant or animal in a location.

Invasive Species: A plant or animal that did not originally live in the geographic location, was introduced by humans, and typically outcompetes native species.

Generalist: A species that has a wide niche, meaning it can survive in many environments and eat many different kinds of food.

Specialist: A species with a very narrow niche that requires certain foods or climate conditions to survive.

Species Diversity: The number of species and the number of individuals of each species found in an area.

Urban Gradient: A change in land use across space from countryside to city.

Conflict of Interest

The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.


This work was funded by the University of Kansas General Research Fund, #2105081 to JMG. HFJ was supported by a Gould Entomology Undergraduate Award.


[1] Gottschalk, M., De Toni, D., Valente, V., and Hofmann, P. 2007. Changes in Brazilian Drosophilidae (Diptera) assemblages across an urbanisation gradient. Neotrop. Entomol. 36:848–62. doi: 10.1590/S1519-566X2007000600005

[2] Bombin, A., and Reed, L. K. 2016. The changing biodiversity of Alabama Drosophila: Important impacts of seasonal variation, urbanization, and invasive species. Ecol. Evol. 6:7057–69. doi: 10.1002/ece3.2452

[3] Gleason, J. M., Roy, P. R., Everman, E. R., Gleason, T. C., and Morgan, T. J. 2019. Phenology of Drosophila species across a temperate growing season and implications for behavior. PLoS ONE 14:e0216601. doi: 10.1371/journal.pone.0216601