I know it is winter but I wanted to make sure you had something to refer to when the weather warms up (if you don’t live in the tropics) and buy lots of fruit. The most annoying part of summer is the annoying fruit fly.
A simple way is to put some apple cider vinegar in a cup and leave it on the counter. It works but is not a “fast cure”.
One way is to plug all the drains in your kitchen. They seem to hatch their eggs inside the drains. Be sure to refrigerate all your fruit. Wash them when you first bring them home and then put them in the fridge (except bananas, they go black).
Another way, is to check your windows. You will find several here, so if you are fast enough, hit them with the good old fashioned fly swatter. If that fails, spray them with hair spray. This will prevent them from flying and you can dispose of them.
You have to be alert and catch them when you first see them as they multiply at a very fast rate. Good luck and I hope this helps.