Helping Nebraskans enhance their lives through research-based education.

Managing Fruit Flies: Make Your Own Trap

by Barb Ogg, Extension Educator

Click to email this page to a this page to a friend

If you bring garden produce into your kitchen, you may get fruit flies. Fruit flies are tiny, honey-colored flies with reddish eyes. They breed in overly ripe vegetables and fruit.

Fruit Fly

Once inside, fruit flies will emerge from your vegetables and will lay eggs on fruit on the counter, in food debris in your garbage disposal or garbage can. They can also breed in a rotted potato or onion. Do you recycle cans? Liquid from pop, beer or wine can produce fruit flies.

Fruit flies are attracted to processes associated with fermentation and breed in decaying fruits and vegetables. In the fermentation process, yeasts act on sugars, producing alcohol and carbon dioxide. Researchers at University of California-Berkeley found fruit flies are actually attracted to the carbon dioxide (CO 2 ) released during the fermentation process, not the alcohol.

The key to managing fruit flies is to locate and eliminate breeding sources. Once you do this, it can still take a couple weeks to get rid of all the flies that will eventually die a natural death. To speed this up, try using a simple, inexpensive fruit fly trap. What attractant should you use? We know fermenting liquids will attract fruit flies, but most of us don't want to brew beer or ferment fruit in our kitchen just to get rid of flies. Instead, use yeast.

Fruit Fly Trap Ingredients

Simple Yeast Trap for Fruit Flies

1. Use a one-pint glass jar. Add 1/4 - 1/3 cup of warm (not boiling) water. Sprinkle a package of activated dry yeast over the water. Add one teaspoon of sugar to activate the yeast. Swirl the yeast liquid. In a few minutes, the sugar will cause the yeast to foam and expand and start producing CO 2 .

2. Take a small plastic bag (like a sandwich Baggie®) and place over the mouth of the jar with one corner reaching into the jar.

3. Poke a small hole (no more than 1/8-inch diameter) in the corner of the bag with a pencil.

4. Secure the bag around the rim with a rubber band or canning ring.

This trap will immediately begin attracting flies, which will crawl down the plastic, through the hole and into the jar. Once captured, most of them will be unable to find their way back out. Fruit flies tend to be active during the daytime, so make sure your trap is on the counter during the day.

Some captured female fruit flies will lay eggs, which hatch into maggots. These maggots will feed on the yeast liquid in the bottom of the jar. At 77 degrees F, it will take about one week for fruit flies to develop through three maggot stages, pupate and produce a second generation of adult flies. (At 70 degrees F, this life cycle will take about 10 days.) Once they are mature, the maggots will crawl up the inside of the jar to pupate. At this point, it will take less than a day for them to emerge.

Most of these second generation flies will be unable to find their way out of the trap, but to prevent any escapees, you may want to dump the contents of the yeast trap and clean out the jar to kill the larvae. Dumping the trap one week after you initially made the trap should be soon enough. If you dump the contents in the sink, flush the pipe with water for a minute to make sure larvae are flushed into the sewer system. If you still have fruit flies, you'll need to make a new yeast trap.

If the flies you have don't seem to be interested in the trap, you may have a different species of fly and will need to consult with someone (like your local extension educator) who can identify your flies.

People who have used these traps have been amazed at how fast they work.

The information on this Web site is valid for residents of southeastern Nebraska. It may or may not apply in your area. If you live outside southeastern Nebraska, visit your local Extension office

Contact Information

University of Nebraska-Lincoln in Lancaster County
Web site:
444 Cherrycreek Road, Suite A, Lincoln, NE 68528 | 402-441-7180