There are many ways to do that.
1. Close doors and windows and spray insecticide in every room. Go away for a while, and air the house completely when you come back.
2. Put a small amount of cider vinegar in a pop bottle and leave it where flies can find it. Check every day to add more if needed.
3. Put mint extract in a small spray bottle with water and spray liberally.
4. If you drink coffee, spread the grounds around the foundation of the house.