we had them 3 years ago - filled several tiny glass baby food jars with apple cider vinegar, placed a Solo plastic bathroom size cup into the top (after poking holes in it with an ice pick) - flies in, drown, dump cup - repeat daily (for us, it took months, literally...)
cause of flies? - our downstairs neighbor moved several years ago, unplugged her refrigerator (without emptying it!!!) - when she moved back 2 years ago, we saw the refrigerator outside by the dumpster - literally black inside with slime and flies - that was the cause - no flies since then