How to Prevent and Eliminate Fruit Flies in the Worm Bin

The risk of fruit flies in the worm bin is pretty much a fact of life for anyone who wants to get started with vermicomposting.

The bigger risk – to me anyways – is that someone will encounter fruit flies and give up vermicomposting forever.

In an effort to prevent this, I created this article to acquaint you with:

  • the basics of fruit flies
  • what fruit flies are attracted to
  • how to prevent fruit flies
  • how to trap, kill, or eliminate fruit flies from your worm bin

Fruit Fly Basics

The fruit fly, or drosophila melanogaster, is a very common household nuisance. Though they has shortish lifespan of 40-50 days, these little jerks are prolific reproducers as a female will lay 40-50 eggs at a time, around 100 per day, and close to an estimated 2000 in her lifetime.

Take that Octo-Mom!

Don’t Fear the Fruit Fly

Although fruit flies are a nuisance, they do not carry and/or transmit human disease like mosquitos.

These eggs hatch after only 12 hours and the resultant larvae grow for about 4 days before pupating for another 4 days before they emerge as adult fruit flies. And a female becomes sexually mature only 8-12 hours after emergence.

The optimum temperature for fruit fly propogation is 82°F/28°C, unfortunately very close to the 72°F-82°F temperatures where you want to keep your worm bins.

What Attracts Fruit Flies

Rotting, fermenting foods are serious attractants for fruit flies.

Fruit flies are attracted to moist environments with fermenting food waste. They like garbage disposals, kitchen waste baskets, and of potentially, worm bins.

Of the various wastes you might find in a worm bin, fruit flies are especially attracted to the very same sugar-rich foods that your worms will find the most attractive: pumpkins, honeydew, canteloupe, banana, watermelon, etc.

Fermentation is the anaerobic processing of sugar into alcohol or acid, so sweet, carbohydrate-rich foods like the ones mentioned above are prime candidates for attracting fruit flies.

How to Prevent Fruit Flies in the Worm Bin

I want to be upfront.

If you keep your bin indoors, do not promise your spouse, roommate, or significant other that your bin will NEVER result in fruit flies.

While vermicomposting itself is not difficult, vermicomposting with a zero tolerance policy towards any fruit flies ever will surely lead to disappointment.

But that doesn’t mean that there’s nothing you can do to prevent fruit flies or at least greatly prevent their proliferation in your worm composting bin.

Can the Urban Worm Bag Keep Fruit Flies from Getting In?

In a word, no.

While the Urban Worm Bag can make it more difficult for fruit flies to enter, they can still sneak in between the two top zippers and make their way in as tiny eggs and larvae on the food waste you introduce to the “UWB.”

Freeze Food Waste to Kill Fruit Fly Eggs and Larvae

The 1979 movie When a Stranger Calls features a scene where police tell Jill that the stalker’s phone calls “are coming from inside the house.”

Likewise, if you’re trying to prevent fruit flies, its helpful to know that they may very well be coming from inside your bin.

Because you put them there!

If you’re in the habit of leaving food waste to just hang out before feeding it to your worms, it is highly likely that fruit flies are laying their too-small-to-see-with-the-naked-eye eggs on it. Fruit fly eggs measure about one half of a millimeter.

This means you are introducing the soon-to-be fruit flies to your bin.

So it may be a good – although not carbon-neutral – idea to freeze your food waste before introducing it to the bins to greatly reduce the initial population of fruit flies that you’ll have to contend with.

Freezing food waste also has the added benefit of speeding up the vermicomposting process once it’s thawed due to the rupturing of cell walls as the water inside them expands.

Read more about my thoughts on freezing food waste for the worm bin.

Keep High Levels of Bedding

One of the most common mistakes new vermicomposters make is forgetting about the importance of bedding after their worm bin is established. My hunch is that too many worm bin owners only consider bedding in the beginning and consider it an afterthought afterwards.

A low level of bedding relative to food waste contributes to wet and anaerobic conditions. As fermentation itself almost always occurs in anaerobic conditions, simply keeping an aerobic environment with high levels of bedding will help keep fruit flies at bay.

Note: An aerobic worm bin does not mean fermentation is not taking place anywhere. A healthy aerobic with a whole orange left to rot will ferment and attract fruit flies. Ask me how I know this!

High levels of bedding will also give you the option of burying your food waste underneath it.

Excellent Bedding Choices

Use one or more of the following to continually add carbon-rich bedding to control your fruit fly population.

Learn More

worm bedding featured image

Check out 9 awesome choices for bedding in your worm bin!

Bury Food Waste to Reduce Fruit Flies

Burying food waste in the worm bin under dry bedding or mature vermicompost makes for a less ripe environment for fruit flies.

Fruit flies deposit their eggs by piercing the skin of fruit, vegetables, and other targets of opportunity. Burying ripening organic waste in your vermicompost or under a layer of bedding will go a long way towards denying fruit flies a maternity ward for their little ones.

Skip a Feeding

Several Urban Worm Company readers suggested this one and it makes plenty of sense!

If fermenting food waste is attracting fruit flies to your worm bin, then maybe a little less food waste will help!

While the entire point of vermicomposting for many worm bin owners is to process food waste, you have to balance it against your tolerance for fruit flies. So if you’ve give your bin a good “workout” with a heavy feeding or two, give it a rest for a week.

Consider using an Urban Worm Blanket

Image of the Urban Worm Blanket

Given the choice, fruit flies will lay their eggs directly on food waste. Failing the availability to access food waste directly, they’ll lay their eggs as close to it as possible.

One option to consider to make your vermicompost bin a harder target is to use an Urban Worm Blanket.

Made from the natural fiber jute, an Urban Worm Blanket is unlikely to be a welcoming habitat for fruit flies seeking to propogate.

Intended more to help maintain a dark, moist environment in any worm bin, the Urban Worm Blanket may also be an effective countermeasure against those pesky fruit flies.

How to Kill or Eliminate Fruit Flies in Your Worm Bin

Can’t keep the fruit flies out of your worm farm? Do the next best thing and get ’em outta there!

Note: All of the fruit fly trap solutions below will be non-toxic to worms if they come into contact with your vermicompost.

Make a Homemade Fruit Fly Trap Next to Your Bin

A simple jar of vinegar with a small paper funnel inserted into it will create a very effective DIY fruit fly trap.

The little buggers can get in, but they can’t get out.

24 hours should be long enough to thin the herd! Note: This could be risky to actually place inside a worm bin as it can be a bit top-heavy.

Put a Fruit Fly Trap In Your Bin

Most worm bins don’t have the vertical clearance to allow for the funnel method described above.

In a bin like the Urban Worm Bag, you might opt for a shallow jar or Tupperware dish, again filled with vinegar or maybe even red wine as pictured!

Cover the jar tightly with cellophane and puncture the top of the cellophane several times with a toothpick. This too will attract fruit flies to the vinegar or wine but the inward facing punctures will make it damned hard for them leave!

Consider these Non-Toxic Fruit Fly Traps from Amazon

Suck up the Fruit Flies with a Vacuum

This is perfect in a bag-style vermicomposter like the Urban Worm Bag.

Simply insert the wand of your vacuum cleaner through the top zipper, keeping the opening only as large as needed to get the wand in there.

Once you turn on the vacuum, leave it on for a couple minutes, ensuring that the wand isn’t close enough to start sucking up bedding.

While I doubt you’re going to count them, it wouldn’t surprise me if you just removed hundreds of egg-laying fruit flies from your worm bin in a matter of seconds!

Summary: The Battle Against Fruit Flies Is Difficult, But Winnable

To paraphrase the words of ESPN’s Dan Patrick, “you can’t stop fruit flies. You can only hope to contain them.”

While I do have plenty of readers who don’t express issues with fruit flies, worm bin owners who push their bins to the limit will at some point find that they’ve attracted the little buggers, like college guys to a kegger.

So if you’ve had luck preventing or eradicating fruit flies from your worm bin, I’m curious to know……what’s been working for you?

Let me know in the comments below!

26 thoughts on “How to Prevent and Eliminate Fruit Flies in the Worm Bin

  1. I had an issue with fruit flies in my apartment (but not, amazingly enough, in my worm bag) and I found that the best bait is apple cider vinegar. We tried regular vinegar with little success, but the fruit flies were hypnotically attracted to the apple cider vinegar.

  2. That’s right Elizabeth, apple cider vinegar (organic) is best especially with the ‘mother’ shaken up. I rid my kitchen of these pesky pests every time!

  3. I never have fruit fly problems if I lay a sheet of newspaper over the top of the properly bedded food waste. I use the newspaper that lines the waste bucket to soak up humidity in the bucket. Don’t ask me how, but it seems to work. I know because I stopped putting the paper over the properly bedded food waste to cut down on the moisture. I still got the moisture but ended up breeding fruit flies.

    1. I did what Glen said before and it works. The wet paper barrier prevents the fruit fries to get in contact with the fermented fruits.

  4. Fruit Fly trap-

    Take a small jar or cup with straight sides. Fill it about container with 1/3 with Apple Cider Vinegar. Add just one drop of liquid dish soap(I like Dawn), add 1/3 of the container with water. Stir gently to mix the liquid soap and vinegar with the water. Place anywhere near your flies. Don’t worry, they will find it. Apple Cider Vinegar is like Catnip to a cat, they can’t resist it. The liquid soap breaks the surface tension of the water. If you watch, they will line up around the edge, the smell will make them jump into the solution. With the soapy water, the fly’s will sink to the bottom and drown. After a week or two, rinse out cup or jar and repeat. I have used this method for years, and works all the time. They can smell the cider mix from across a room.

    1. Jan, do you perpetually have a jar out? Or only if you notice fruit flies and are trying to get it under control? I’m new — have just got my indoor bin, starting to prepare it. Haven’t gotten worms yet. Reading up on what to expect.

      1. I didn’t have a problem with fruit flies until 6-7 months in. I believe I should have harvested my black gold already at this point. It looked fluffy black no smell. Living organisms inside. Then I got lazy and didn’t harvest the vermicast. Then I made the mistake of over feeding them, I also didn’t chop the veggie Fruit waste into smaller pieces, and I made the mistake of not adding enough/more bedding material.
        This is when I began to have fruit flies. I haven’t given up! I tried some fruit fly traps and numbers have gone down.
        Lesson learned.
        Soon I’m going to harvest the worms and vermicast. I believe I will now need two worm bins, as the worms were loving their home and reproducing like crazy!
        I do not own a fancy worm bin. Just a diy 30 quart blue storage plastic bin.
        Thanks for the article and comments from others. I love my worms!

      2. Angeline, sorry for not answering sooner. But to answer your question, yes. As soon as I see them I place the trap out. On a shelf or out the way place. Doesn’t even have to be in the same area, they WILL find it and the rest is history. If the trap solution gets foggy looking, just stir it up again. Try to keep the edge of the container free of any solution. You want to jump in and not get a free drink from the lip. At the end of 2 weeks, I’ve had a 1/2″ of black sludge in the bottom of the trap…. 1000’s of dead flys. Just wash it out and start over. Good luck.

      3. I to am new to worm farming,be prepared to learn a lot,a currently dealing with frit flies, hanging tape works great. I started to have worms for the family and friends for fishing, got to reading up on them now even have ex wife eating to learn more. Best of luck to you on this adventure.

  5. I’ve just acquired my first worm farm given to me by a neighbour. I asked her about the fly problem and she advised that she had no idea what they were. On reading your article I now know that I’m dealing with the dreaded fruit fly which is a serious problem as I have fruit trees on my property and have never had a problem in the past.
    Thank you for your advice. As of today I’m on it!

    1. No worries, Michael! Fruit flies are very common and not as hardy and difficult to eradicate as fungus gnats or other pests. Just make the mixture a little less rich (less fruit, more carbon) and you’re good!
      Cheers,
      Steve

      1. Have you ever considered using Heterorhabditis bacteriophora or some other entomopathogenic nematode or fungi to kill the fruit flies? Are there any parasitoid wasps or mites that eat the eggs/some kind of biological control?

  6. A couple of drops of unscented dish soap in apple cider vinegar is an easy way to catch them.
    Try it and you’ll see that you don’t really need the funnel/plastic wrap…

    I leave a some out as a preventative.

  7. Please remember that fruit flies are a very, very important source of protein for hummingbirds, especially hummer moms feeding babies. If you can put your vermicomposter outside ‘close’ to your hummingbird feeders in the Spring, Summer, and Autumn, and let the fruit flies have at it, it will benefit the birds tremendously!

    1. It’s close to 100 outside near my hummer feeder. If I put my bin out – even in the shade, won’t it kill the worms?

      1. This depends. If your bin has enough volume, that volume should provide a good buffer against temperature extremes. It will be cooler during the day than the outside temp, but warmer in the evening.

  8. My UWF book suggested Neem oil. Can you recommend a good product for this? My local hardware store had some but it was 90% “other ingredients” and said it was good for killing other types of worms so I didn’t want to risk it. We have a horrible fly infestation that the cider vinegar is not touching.

  9. I am getting ready to start a new container. I am getting worms from an already established vermi composter friend. However, she had a recent fruit fly outbreak. As cooky as it sounds, can (or should) I rinse the worms in water(?) when I get them in the hopes of rinsing off an residual fruit fly eggs/larvae? Thanks

  10. Basement worm bin. I tried fly traps, fly strips, in the bin around the bin, DTI and the vacuum. Thanks to Uncle Jim and Mercer County Master Gardeners, the one action that stopped and reversed the fly population explosion in 24 hours was shredded paper, deep shredded paper bedding. Thank You.

    1. Good advice John, I live in a very warm humid place and fruit flies are super common. All fruit and vege has to be stored in the fridge.
      I took my worm farm outside and exposed the top layer to light for about half and hour. I washed the eggs of the fruit flies off the lid (boiling water, soap)
      The worms went down to the bedroom and I started slowly to remove the whole top layer (kitchen) finding any stray worms and saving them in the clean lid.
      Removed top layer entirely, and set bedding in kitchen level. Let set for 2 days before feeding.
      Inside, while there was no food also set a fruit fly trap (organic apple cider vinegar, plastic wrap with holes)
      I totally agree that bedding and keeping it dry is the way to go.
      Thanks everyone for the tips. The most useful thing to know: I have fruit fly because I put them in there!!
      This was also a good way to find out what the worms tend to leave in the variety of foods I put in there.

  11. Thanks for the tips! I tried red wine vinegar with a drop of dish soap (read that somewhere) and it didn’t catch a thing. But I started getting worms jumping ship a lot. So last night I put out apple cider vinegar traps (mostly straight ACV with a drop of Dawn, covered in plastic wrap with small holes poked – i also tried one with a paper funnel). I put one small version inside one of my worm bins…wow, did they try to flee like crazy! I took it right back out, obviously, but it seems even having a trap in the same room was too much smelly vinegar and they still kept trying to escape. I took out all vinegar from their room and now they are happily staying in their bins! (the traps in other rooms haven’t caught anything yet)

  12. Each time I had a fruit fly outbreak it was from over feeding and a lack of bedding in my bin. “Fasting” my worms fixed the issue every time. If you ever get white spider-web looking mold in your bin, you are over feeding and/or do not have enough bedding.

Leave a Reply

Your email address will not be published. Required fields are marked *