Fruit flies are especially attracted to ripened fruits and vegetables in the kitchen.
A mixture of apple cider vinegar in a small bowl with a few drops of dish soap always does the magic of ridding your kitchen of the flies.
The idea is that the irresistible vinegar attracts the fruit flies, while the soap breaks the vinegar's surface tension and drowns them.