If you have a compost bin or even just a garbage can (so that means pretty much all of us), you’ve probably gotten fruit flies at some point. These largely harmless flies lay their eggs on rotting fruit. The eggs hatch in a half a day and the larvae grow, drawing on the sugars from the rotting fruit or organic matter. Depending on the temperature, the larvae turn into flies sometime between four and eleven days later and are able to mate within a half day, laying hundreds of eggs in their short ten-day lifespan.
While they’re harmless, the flies can be bothersome, and I’ve tried a few types of traps. One uses an inverted cone or funnel taped onto a glass jar with rotting fruit inside: the flies find their way into the funnel and jar but can’t find their way out. This worked okay, but recently I found another type of trap online and I’m really impressed.
Take a jar, put in a drop of dish soap, and then pour in a quarter to a half cup of apple cider vinegar. The smell attracts the flies and usually they’d be able to sit on top of the liquid due to surface tension, but surprise! The soap has disrupted that tension and the flies sink into the liquid and die. It’s really easy and effective. Once the smell of vinegar starts to fade, you simply rinse out the jar and refill it.
Oh, and don’t forget to use a compost and trash container with tightly sealing lids to cut off other locations for the flies to breed.