Mix the following ingredients together in an open jar or other container:
1/2 qt water (2 c)
2 T sugar
2 T (white) vinegar
Add a couple of drops of liquid dish soap
Leave the mixture sitting out in the infested area, as long as needed.
Non-lethal Fruit Fly solution
A non-lethal way to get rid of fruit flies is to put a half of a banana into a jar or glass, and cover with plastic and then poke small holes in the plastic. The fruit flies will fly in to get the banana, but won’t be able to get out. When you believe you have trapped them all, simply put the banana outside.