You are here: Home Blog School Compost and Fruit Flies

School Compost and Fruit Flies

by Josh Vincent — last modified Jun 09, 2011 05:37 PM

How to manage fruit flies in compost, from guest blogger Anne Donahue, Compost and Urban Agriculture Program Coordinator, City of Eugene

Many schools are turning to on-site composting to keep from sending bread and salad bar food scraps to the landfill.  A simple backyard bin system has proven effective at many schools throughout Lane County, but at certain times of year, compost macro organisms will flourish and need to be managed to prevent them from becoming pests. 

Fruit flies are one example of a compost critter that can become a compost pest if not managed well.  They are a natural part of the composting process, but can quickly become a nuisance if the compost pile is not in balance.  In fact, in just under two weeks, eggs turn into larvae and then hatch into adults.

Follow these management steps to keep fruit flies and any flying pest under control

1)    The best way to deter fruit flies is to deny them access in the first place.  To do so, cover all food scraps with a one inch layer of sawdust.  This reduces the odor of decomposing food scraps so adult flies are not attracted to your compost to begin with.

2)    Set out fruit fly traps to kill adults and stop the egg laying cycle.

a.    A trap consists of a 16 oz cottage cheese container with one inch of apple cider vinegar and a few drops of dish soap. This container can rest on top of the compost, (remembering to remove it and then replace it every time the food scraps get dumped into the compost bin), or attach the container with wire to the inside of the compost bin a few inches below the lid of the bin.

3)    Kill the larvae feeding on the food scraps.  Do this by purchasing a bale of alfalfa from your local feed and farm store, and sprinkle a flake or two (about a 4 inch section) onto the top of the compost.  Using a pitchfork, mix the alfalfa into the top 8-10 inches of the compost pile.  This will heat up the top layer of compost where the larvae are feeding, killing the larvae. Keep the extra alfalfa in a container or garbage bag next to the compost bin.  If the alfalfa is not needed for the compost, you can use it as mulch around garden plants to deter weeds, reduce water evaporation, and provide a slow release fertilizer for your plants.  Be careful to keep the alfalfa a few inches away from your plant stems so your plants don’t rot.  Having alfalfa on hand is a great way to heat up the pile any time of year, and the extra nitrogen makes the compost extra fertile for the garden when the finished compost is spread on the garden.

4)    Lastly, it helps to turn or “fluff” the top ten inches of food scraps each Friday, and then put a one inch layer of dry sawdust on top of the food scraps for the weekend. Turning this top layer of food scraps each week helps the food scraps break down more quickly, reduces compaction in your compost pile, and helps air flow through your compost pile. A school should always have a 32 gallon trash can of sawdust on hand to keep food scraps covered at all times.

These management practices should keep fruit flies and other flying pests to a minimum.  This is necessary primarily in the fall and the spring.  Fruit flies are less of an issue in the winter when the weather freezes. 

Most importantly, remember that school composting has a learning curve, and each challenge is an opportunity to learn how to compost more effectively.  Composting food scraps empowers students to make the most of resources every day.

 The compost process is dependent on many micro and macro organisms coming together to do their natural work.  When one group of organisms flourishes with a negative impact, rebalancing of the system needs to occur.  Fruit flies will come, but can be managed to appropriate levels.  The eventual outcome is compost that will feed the soil and feed school gardens and allow school children to eat the freshest fruits and vegetables possible. 

Anne Donahue, City of Eugene Compost and Urban Agriculture Program Coordinator,, 541-682-5542