If they are inside, leave a wine bottle out with a sip of win left in it. They will fly in and can’t fly out and will drown. Or you can leave a small bowl of vinegar out with a couple drops of soap in it and they will be drawn to the vinegar.
Outside, an old horse barn trick. Fill a ziploc bag about 3/4 full of water and tack or nail it to the doorway nearest to where you hang out the most. Don’t know why, but it repels flies.
Good luck!