If you have a fly infestation you should put up some fly tapes which will attract the flies and when they land on the fly traps they'll get stuck and won't be able to get off.
That will take care of some of the fly problem.
Another way to get rid of flies indoors is to use Apple Cider Vinegar and scented dish soap and sugar in a bowl to make a homemade fly trap.
To make a homemade fly trap take a shallow dish bowl and fill it with an inch of apple cider vinegar and a tablespoon of sugar and then add some fruit-scented dish soap.
After you do that leave the dish uncovered or tightly covered with plastic wrap and poke a few holes in the plastic wrap to attract the flies.
You could also use a two liter bottle and fill it halfway with apple cider vinegar, dish soap and some sugar to attract the flies.
It's best to cut the bottle in half and then flip the top portion of the bottle over and place it into the bottle like a funnel and secure it with tape.
The flies will go down into the bottle and drown in the soap and water.