Vinegar flies show up if I leave food sitting in the kitchen, especially fruit. First I'll see one or two. Not a big deal. But before long there are dozens. Now it's annoying! Totally eliminating vinegar flies in this environment is impossible because of year around rotting fruits out in the woods and people's yards. So my goal has always been just to control the ones who end up in my kitchen. And by the way, there are many critters out there that rely upon vinegar flies as a food source. Thus eliminating vinegar flies would cause a shift in the ecology, one that might be detrimental. Therefore vinegar flies can exist in my book, just not in my kitchen.
The easiest and simplest way I've found to control them is to make a jar trap. This is only one type of homemade trap. There are many variations. But I found that this one works well for me, plus the cats and dogs have no interest in the jar. And I don't notice any unpleasant odor from it.
I'll use a stable, squat jar, one that is not easily knocked over.
So I take the jar......pour in an inch or two of apple cider vinegar, take a bit of waste plastic or plastic wrap to cover the top, and secure the plastic with a rubberband.
A little note......I notice that the flies inside the trap will walk around the top rim of the jar trying to find a way out through the plastic covering. But they don't seem to walk to the center where the entrance hole is. So the trick is not to make the hole anywhere near the rim.