Question: are fruit flies get rid of them?
Answer: Use apple cider vinegar. Fill a bowl or glass with apple cider vinegar, cover with plastic wrap and a rubber band to seal the edges, and poke tiny holes in the top. The fruit flies will be attracted to the vinegar, but once they're inside, they won't be able to escape the plastic wrap barrier.