Composting is so simple: you just add kitchen and garden waste to a pile or bin and stir it from time to time. It couldn’t be easier! But there are occasionally unpleasant surprises … like when you open the lid of your composter and the air instantly fills with thousands of fruit flies (Drosophila spp. and others).
Fortunately, solving this problem is easy.
What They Like
Fruit flies are attracted by the smell of decomposition and, more specifically, fermentation, not only of fruits, but of other plant materials. They’ll come from quite a distance in search of their favorite food source: some species can smell fermentation up to a ½ mile/1 km away. They love compost piles, especially open ones, where they can lay their eggs on exposed fresh kitchen scraps. Since each female can lay up to 500 eggs and it only takes a week or so to produce a new generation of flying adults, you won’t really be exaggerating when you claim there are thousands of fruit flies hovering over your compost bin!
Just covering your compost bin with a lid may help a little, but if there is an opening somewhere, they’ll soon find it!
The easy solution to a fruit fly infestation is just to bury fresh ingredients, especially fruits and vegetables, under more decomposed compost from further down in the pile. Fruit flies can’t dig and if their food supply isn’t directly exposed, they’re toast! Problem solved!
Or cover fresh scraps with “brown matter.” (People who compost commonly divide ingredients into “brown matter,” rich in carbon, and “green matter,” rich in nitrogen.) Brown matter is of no interest to fruit flies.
Many gardeners keep bags of fall leaves, harvested the previous autumn, on hand so they’ll have plenty to add to the summer compost. A layer of brown leaves makes an excellent fruit fly barrier. If you don’t have a handy supply of leaves, cover your compost pile with other brown materials, such as shredded newspaper or wood chips.
Or Live and Let Live
While humans generally disdain fruit flies, they are not harmful per se. As long as they are outdoors, you don’t have to control them if you don’t want to. If their presence doesn’t bother you—and your neighbors aren’t complaining—, you can simply leave fruit flies alone. They’re even useful! Their larvae help decompose fresh materials and adults attract swallows, phoebes and other insect-eating birds to your garden.