While I don't have a remedy for house flies, I do have a remedy for fruit flies! Take a cup, fill it with 25% water, 25% monster energy drink original flavor, and leave the other 50% air. Put one small drop of soap in it. Then cover with plastic wrap and poke holes in the plastic wrap the size of pencils.
Fruit flies will be attracted to the monster, fly in expecting to land on the water's surface tension but the soap broke the surface tension so the flies end up drowning. It is surprisingly effective.