Fruit flies do not live for only 24 hours. Under favorable conditions, an adult fruit fly can survive for approximately 40–50 days. Its complete lifespan—from egg laying through development and adulthood—may extend to roughly 50–60 days, depending on temperature, food, humidity, species, and environmental stress.
Their lives are relatively short, but fruit flies reproduce quickly. A new generation can develop from egg to adult in approximately 9–12 days at around 77°F (25°C). This rapid lifecycle explains how a few flies around a banana or trash can can become a noticeable infestation within a week or two.
How Long Do Fruit Flies Live?
The common kitchen fruit fly, often identified as Drosophila melanogaster, usually lives for about 40–50 days as an adult when temperature, moisture, and food are favorable. Laboratory studies sometimes record longer lifespans because flies receive controlled temperatures, balanced food, and protection from predators and household hazards.
In an ordinary home, many adults die earlier. Cleaning products, traps, dehydration, lack of food, changing temperatures, and physical removal can shorten their lives.
However, waiting for adult flies to die naturally will rarely solve an infestation. Before dying, females can lay numerous eggs in fermenting material, creating another generation that appears while the original adults are disappearing.
Fruit Fly Lifespan at a Glance
| Developmental stage | Approximate duration |
| Egg | About 1 day |
| Larva | About 4–6 days |
| Pupa | About 4–5 days |
| Egg to adult | About 9–12 days |
| Adult lifespan | Commonly 40–50 days |
| Potential egg-to-death lifespan | Roughly 50–60 days |
These figures are estimates rather than fixed rules. Cooler temperatures generally slow development, while suitable warm conditions accelerate it. Extreme heat, overcrowding, poor nutrition, and dryness can reduce survival.
The Fruit Fly Lifecycle

Fruit flies undergo complete metamorphosis, passing through four clearly different stages:
- Egg
- Larva
- Pupa
- Adult
The immature fruit fly looks completely different from the winged adult. Each stage has a particular role in feeding, growth, transformation, or reproduction.
Stage 1: Egg
A female fruit fly searches for moist, fermenting organic material where her offspring will have immediate access to food. Common egg-laying locations include:
- Overripe bananas and other fruit
- Rotting potatoes or onions
- Trash and recycling residue
- Compost containers
- Dirty garbage disposals
- Fermented drinks
- Empty beer, juice, or wine containers
- Food residue beneath appliances
Fruit fly eggs are extremely small, pale, and difficult to see without magnification. A female places them on or near the surface of suitable food.
At approximately 77°F, the eggs may hatch in about one day. Cooler conditions usually delay hatching, while unsuitable dry conditions can prevent successful development.
Stage 2: Larva
After hatching, the fruit fly enters its larval stage. The larva is a tiny, pale, legless maggot that feeds on yeast, bacteria, fungi, and decaying organic material.
Fruit fly larvae pass through three growth phases called instars. They molt as their bodies increase in size:
- First instar
- Second instar
- Third instar
Under favorable conditions, larval development generally lasts around four to six days. The larvae spend most of this period eating, allowing them to store enough energy for metamorphosis. University of Washington developmental observations place egg hatching around day one, with the three larval instars continuing until pupal formation begins several days later.
Mature larvae may crawl away from the wettest part of the food. They often move toward a drier surface, such as the side of a container, the underside of a trash-can rim, or an area beside spilled liquid.
Stage 3: Pupa
Once a larva finishes feeding, it forms a protective case and enters the pupal stage. Fruit fly pupae are small, oval, and usually brown or tan.
The fly does not simply rest inside the case. Its larval body is reorganized into an adult body with:
- Wings
- Legs
- Compound eyes
- Antennae
- Reproductive organs
The pupal period commonly lasts approximately four to five days at favorable temperatures. A fully formed adult then breaks out of the pupal case in a process known as eclosion.
Pupae can be harder to eliminate than visible adult flies because they do not feed and may be hidden on relatively dry surfaces near the breeding source.
Stage 4: Adult
A newly emerged adult is initially soft and light-colored. Its body gradually darkens, its wings expand, and it becomes active.
Fruit flies reach reproductive maturity surprisingly quickly. Females can become sexually mature within hours after emerging, allowing the next reproductive cycle to begin almost immediately.
Adults feed on fermenting liquids and microorganisms rather than chewing solid fruit. They use sponge-like mouthparts to consume liquid material from soft, damaged, or decaying produce.
Why Fruit Flies Multiply So Quickly

A fruit fly infestation grows quickly because the generation time is short. When development takes only about 9–12 days, eggs laid during one week can become reproducing adults during the next.
Several generations may overlap inside a home. At the same time, you may have:
- Adults flying around the kitchen
- Eggs hidden on fruit or residue
- Larvae feeding inside moist waste
- Pupae attached to nearby dry surfaces
This is why killing the visible adults often produces only temporary improvement. Hidden eggs, larvae, and pupae continue developing and replace them.
What Affects a Fruit Fly’s Lifespan?
Fruit fly development and survival depend heavily on surrounding conditions. Two fruit flies of the same species may live for different lengths of time when exposed to different temperatures, food, humidity, or stress.
Temperature
Temperature strongly affects the speed of development. Around 77°F, common fruit flies can develop from egg to adult in approximately 9–12 days. Lower temperatures slow metabolism and extend developmental time.
Warm conditions may accelerate development up to a point, but excessive heat creates stress and can reduce survival. Temperature therefore affects both how quickly adults appear and how long individual flies remain alive.
Food Availability
Adult fruit flies need access to moisture and energy-rich material. Fermenting fruit, sugary spills, alcoholic beverages, yeast, and decomposing produce provide suitable food.
Removing these sources can shorten adult survival and, more importantly, prevent females from finding suitable places to lay eggs.
Moisture
Fruit flies are small and vulnerable to dehydration. Moist kitchens, leaking containers, dirty drains, compost, and wet trash provide better conditions than clean, dry environments.
Moisture alone is not normally enough to sustain an infestation. It must usually be combined with organic material that adults and larvae can consume.
Crowding
Heavy larval crowding increases competition for food and space. Research indicates that larval density and developmental conditions can influence adult size, health, and longevity.
Genetics and Sex
Genetic background can significantly influence lifespan. Laboratory strains have been developed or studied specifically because some live longer than others.
Male and female longevity can also differ, although the direction and size of that difference depend on strain, diet, mating, and laboratory conditions. One large genetic study reported average adult lifespans of 38 days for females and 42 days for males across the lines examined.
How Long Do Fruit Flies Live in a House?

Fruit flies can live for several weeks indoors when they have consistent access to food, moisture, and protected breeding locations. Kitchens provide especially favorable environments because temperatures remain relatively stable and food is frequently available.
A fruit fly may survive and reproduce around:
- Fruit bowls
- Trash cans
- Recycling bins
- Compost buckets
- Sink drains
- Garbage disposals
- Beverage stations
- Pantry spills
The infestation can appear to continue for months, but this does not mean the same individual flies are surviving that long. More commonly, successive generations are continuously replacing one another.
How to Break the Fruit Fly Lifecycle

The most effective way to stop fruit flies is to interrupt their development before new adults emerge.
Remove Breeding Material
Discard overripe or damaged produce in a sealed bag. Check potatoes, onions, bananas, tomatoes, and fruit stored inside cabinets or beneath other items.
Clean Containers Thoroughly
Empty and scrub trash cans, recycling bins, compost containers, bottle-return boxes, and beverage trays. Pay attention to seams, rims, and the area beneath liners.
Clean Drains and Garbage Disposals
Physically scrub away organic buildup instead of relying only on bleach or hot water. Eggs and larvae may remain protected inside the film coating a dirty drain.
Refrigerate Ripe Produce
Keeping ripe fruit in the refrigerator blocks adult flies from reaching it and slows the development of eggs or larvae already present.
Trap Remaining Adults
Vinegar traps can capture adults, but traps should support cleaning rather than replace it. Continue trapping for at least one to two weeks after removing the breeding source so newly emerged adults are also captured.
FAQs
Do fruit flies live for only 24 hours?
No. Fruit flies can live for several weeks, with adults commonly surviving approximately 40–50 days under favorable conditions. The insect often confused with a one-day lifespan is the mayfly, not the household fruit fly.
How long does it take a fruit fly egg to become an adult?
At around 77°F, development from egg to adult commonly takes approximately 9–12 days. Cooler temperatures, limited food, overcrowding, and other environmental conditions can make the process take longer.
How long do fruit fly larvae live?
The larval stage generally lasts around four to six days under favorable indoor conditions. During this period, the larvae pass through three instars before leaving the food and forming pupae.
Can fruit flies reproduce before they die?
Yes. Adults become reproductively mature soon after emerging. A female can lay multiple batches of eggs during her adult life, so one breeding source can produce several overlapping generations.
Will fruit flies eventually disappear naturally?
They may disappear when all food and breeding materials dry out or are removed. However, waiting for them to die is unreliable. As long as fermenting residue remains available, new generations can continue developing and replacing older adults.