How to Identify, Control, and Prevent Fruit Flies

The fruit fly is an incredibly common pest on freshly-picked produce. Find out about them and good methods of prevention from expert Huan Song.

Among all fruit flies, one with a light color sits on a vivid bright green stalk placed on a smooth white surface

Contents

While going on vacation is one of the best parts of summer, it also means not tending to our gardens for days or weeks at a time. I recently went away on a week-long trip during which there were several thunderstorms. When I came back, I saw many of my tomatoes had split from the rain. Along with the rain came a fruit fly infestation, like a veritable storm.

Fruit flies are a common late summer pest both outdoors as well as indoors. Fruit flies are attracted to the smell of ripe and fermenting fruits and vegetables. In this blog, we’ll cover some ways to deal with them in the garden and home. 

What are Fruit Flies?

The common fruit fly, Drosophila melanogaster, is also known as the vinegar fly because of its attraction to the pungent smell of ripe fruits and vegetables. Drosophila melanogaster is just one of many species in the Drosophila genus.

Fruit flies are drawn to specific aromatic compounds that send signals to their antennae. They are believed to have originated from sub-Saharan Africa.

Adults can range between 0.1 and 0.2 inches long with yellow or brown bodies and distinctive red eyes. The adults have two antennae, each with three segments ending in tiny hairs. They undergo sexual reproduction and each female can lay up to 100 eggs per day and 500 eggs in her lifetime. 

Life Cycle

A Drosophila melanogaster with vivid red eyes and hair-like parts standing on a surface that appears moist, having a light orange color
They mature quickly after hatching, leading to a short life cycle.

Fruit flies have short life cycles spanning eight to ten days from egg to adulthood depending on the temperature. They are particularly active in the summer and virtually disappear when the weather gets cold. Their rapid reproduction rate makes fruit flies the perfect species to use in science labs for various genetic experiments. Interestingly, they have been the main contributor in at least nine Nobel-prize-winning studies!

Fruit flies undergo a complete metamorphosis. Each fruit fly starts as an egg, which then hatches into a larvae with three instar stages. The larvae grow and molt during each instar, then become a pupa, and finally emerge as an adult fruit fly. Adults become sexually active quickly after emerging from their pupae and can start mating within 24 hours. 

These pests lay their eggs in moist locations, often in or on fermenting fruit. Both fruits and vegetables can be habitats, particularly as they’re decomposing. It’s not uncommon to find fruit flies near fermenting produce in a compost pile. With such a short life cycle, multiple generations can appear in a single season.

Common Habitats

Two insects with vivid red eyes and brown patterned bodies, sticking to a bright green stalk of a plant standing upright
Ripe fruits and other types of food are attractive to these insects.

Have you ever heard of the saying, “time flies like an arrow and fruit flies like a banana?” It turns out that although fruit flies are attracted to bananas, they have a stronger preference for citrus, especially when it’s time to lay their eggs. 

The fruit fly that we all know today is a generalist and can be found in many common foods. They are also frequently found on unpicked ripe fruits outdoors along with other insects like the citrus fruit fly.  

Scientists who sought out the origins traced it back to a southern African fruit called the marula (Sclerocarya birrea). Loved by humans and animals, they were stored in their cave dwellings. Marula is a very sugary fruit with a highly fermentable pulp and a staple in the diet of many tribes.

What do Fruit Flies Eat?

A brown patterned insect with vibrant red eyes standing while feeding on flesh of fruit with light orange color and  red patches
They are not picky when choosing what to feed on.

Fruit flies are not picky eaters and will feed on just about anything. Despite their name, they are flexible to consume various foods. These include onions, potatoes, and even dew secreted by aphids to name a few. The fruit fly larvae feed on the yeast produced by decaying plant material. 

Control

Someone raking up leaves and other debris on ground using a light green gardening tool with small blades of grass on growing from soil
Keep locations clean and dispose garbage properly to keep these insects at bay.

Fruit flies are very hard to control because they reproduce very quickly and are pervasive. They are one of the most common food contaminants for growers, grocers, and restaurants.

Even if you don’t have fruit flies, you may bring in a piece of fruit that contains eggs or larvae. These will often hatch and reproduce in your home. However, some sanitation best practices can help keep down their population and get rid of fruit flies where possible. 

Organic or Chemical Control

A green bottle of insect spray placed on the ground with flowering bushes in the back.
Organic sprays can help kill adults and get rid of eggs.

Use an organic spray, like horticultural oil, to either kill adult flies or prevent eggs from hatching. Organic sprays are not as effective against adults because the liquid needs to come in contact with the flies in order to work. Apply sprays regularly to mitigate against the rapid generations of these flies. 

Chemical sprays are more typically used in orchards and commercial operations. Farm managers use a combination of techniques. They often use sticky traps or sex pheromone traps to monitor the population of adults. These methods are employed in addition to general sanitation practices. 

Environmental Control

A trap meant to capture Drosophila melanogaster made using a jar and a fruit slice, sitting on a wooden table in a sunny garden
It is easy to make a trap using a jar and other materials.

Traps are a common way of environmental control. They are commercially available or can be easily made with household materials.

Fill a jar with a few inches of apple cider vinegar, beer, or wine, and add in a few drops of dishwashing liquid. The flies will be attracted to the scent of the fermenting liquid. The soap will break the surface tension of the apple cider vinegar and fruit flies will fall in and drown.

Place the trap near susceptible fruits and dispose of the solution with the flies every few days. Alternatively, add a piece of fruit to the bottom of a mason jar and create a paper funnel that sits on top of the jar. Fruit flies will be able to fly in but not be able to fly out of the fruit fly trap. You can also combine these two methods to increase the efficiency of your trapping technique! 

Prevention

Close-up of a gardener removing garden debris from the beds of tomato plants. The gardener is wearing a red shirt, gray overalls and white gloves. A gardener removes dead plants using a garden rake with a long wooden handle.
Maintain cleanliness at home and the garden to remove this insect’s breeding locations.

One of the most important elements of control is to eliminate their breeding sites. Indoors, take out the trash, mop up sugary spills, throw out rotting fruits and onions, and frequently clean out your drains and garbage disposals. Don’t forget about beer cans, wine bottles, and cider bottles and cans!

Refrigerate produce if possible because these bugs cannot develop under cold temperatures. If you make your own fermented foods and condiments, follow the sanitary best practices and tightly seal jars.

Outdoors, it’s important to keep the garden or orchard tidy. Pick up and pick off any fruits that are rotting or have visible infestations. For produce like tomatoes, harvest them before they are fully ripe so they don’t split and spoil on the vine.

Put a tarp over compost or a cover on your compost bin. This can reduce the access to overripe produce near the surface of the pile. It can also help to heat up the compost. High heat can kill the larvae and eggs as well as any adults trapped in the heat.

Frequently Asked Questions

What is the fastest way to get rid of fruit flies?

Get rid of their food source and breeding ground. This means keeping indoor and outdoor surfaces free from rotting or overripe produce. If they can’t breed, they can’t produce the next generation of pest insects.

Keep garbage disposals and drains clean and free from debris from vegetables or fruit. Store food promptly to prevent adults from laying eggs on its surface. Keep trash receptacles closed to prevent infestation.

What attracts fruit flies to humans?

Fruit flies are food generalists that are attracted to many foods that humans grow and consume. Scientists believe that the fly-human relationship developed around 10,000 years ago when humans started eating and storing a southern African fruit called the marula and that fruit flies were originally food specialists who fed exclusively on marula fruits.

SHARE THIS POST
Close-up of a gardener's hand in a gray glove showing a slug eating arugula leaves in the garden due to mistakes made in pest control.

Garden Pests

7 Mistakes to Avoid When Fighting Garden Pests

Pest infestations can get out of hand quickly, but harsh sprays and reactive techniques aren’t always the answer. Some pest management mistakes can even make the bug pressure worse! In this article, former organic farmer Logan Hailey explains how to avoid the most common mistakes when fighting garden pests.

Close-up of trap slugs with beer in the garden. There is a red bowl full of slugs and beer. Slugs have soft, elongated bodies that are brownish-gray in color.

Garden Pests

Can You Trap Slugs With Beer?

It’s a damp spring, and there are sporadic, smooth holes in your beautiful garden greens. There are shiny trails of slime nearby. Ugh, slugs. We’ve all been there. So what to do? Join organic farmer Jenna Rich as she dives into the simple art of trapping slugs with beer.

A close-up of aphids infesting a green leaf. The tiny green aphids are voraciously feasting on the leaf, leaving a trail of small holes in their wake. The leaf's surface shows signs of damage caused by the infestation.

Garden Pests

11 Types of Aphids Found in the Garden

No gardener wants to deal with aphids, but unfortunately, they are almost impossible to avoid. Gardening expert Madison Moulton takes you through 11 of the most common aphid types found in the garden and how to identify them.

common garden pests

Garden Pests

15 Garden Pests To Watch Out For This Season

If you have a garden, you will undoubtedly encounter some garden pests. Garden pests are those animals that dig, chew, bite, suck, eat, or otherwise disturb your plants. In this article, gardening enthusiast Liessa Bowen will introduce 15 common garden pests, how to identify them, and what can help prevent them.

aphids on roses

Garden Pests

7 Different Methods to Get Rid of Aphids on Roses

How do you handle aphids on your roses? These little pests appear in early spring and feed on the new tender growth of your plants. In this article, expert gardener and rose enthusiast Danielle Sherwood walks you through 7 methods for getting rid of aphids, including what NOT to do.