Quote:
Originally Posted by
smedley 
they may prefer it but i have unripe peaches, nectarines and mangoes here that are swarming with fruit flies. i compost, so i would never dispose of fruit in a plastic bag. thank you for your suggestions!!

If they are
swarming that means they are overpopulated, which is why they are resorting to unripe fruit. As I already said, once you have an infestation, you will have to keep
all fruit, as well as even vegetables, away from them. But to
prevent an infestation, you only have to keep very ripe and rotting fruit, away from the area (your habitation) where you don't want an infestation.
You can put the fruit in a snugly covered container, of any kind. It doesn't have to be a plastic bag. Just so it is snugly covered. covered well enough that fruit flies, for the most part, can't get in and out. Or you can take it right out of the house and bring it to your compost pile
immediately. Again, if you already have an infestation, you will have to get rid of unripe fruit, as well as potato peels, lettuce leaves - anything. But to
prevent an infestation, yiou only have to get rid of overripe and rotting fruit.
I am not just telling you what I read somewhere. I know this from practical experience. I am reasonably certain one never has to resort to insecticides or to trapping them and killing them. While you may catch and kill many fruit flies with a vinegar-baited trap (vinegar is a
fermented fruit product, which is why they like it so much), I am skeptical as to whether you can cure an infestation this way. I suspect they will reproduce as fast or faster than they will get killed. The way to prevent and cure an infestation is not to kill them, but to make the environment inhospitable to them.
If you have a fairly strong infestation, fruit flies
will try to eat some houseplants. An infestation suggests overpopulation, and willingness to eat things they wouldn't ordinarily eat.