We recently had an issue with a bazillion fruit flies in our kitchen. Ok... not a bazillion exactly but definitely a lot. They were hanging out in the plastic milk jug we use for our kitchen scraps for the compost pile. They were loving the banana peels.
The problem is that they would fly around in clouds and settle on the cabinetry. Not something I like. So I turned to some internet research to find the best way to get rid of them. I found success in the following formula:
1 drinking glass
1 to 1.5 tablespoons vinegar (any kind, we used wine vinegar)
1 to 1.5 tablespoons sugar
1-2 drops of dish soap
Add vinegar, sugar, and water to glass. Mix with spoon. Add dish soap and gently mix again.
Then set the glass in the general area where the fruit flies are amassing. What happens is that they are attracted to the sweet concoction and then they drop in and can't get out, thanks to the soap. When I watched closely, it looked like they fell off the lip into the glass as if they were momentarily knock out by the smell or something. Whatever... it WORKS!
The next morning all of the fruit flies were gone and a mass of dead bugs were at the bottle of the glass. We've since tried this a second time when new fruit flies appeared. And success again!
Here are some pics of our first fruit fly trap: