Figure out where they are coming from, and resolve that issue. Then over time as you swat them and/or they fly out windows, the problem will solve itself.
Invariably the issue is there is some accessible food source leading them to procreate and continue feeding off the food source. As above, make sure all your foodstuffs are properly stored and not left out in the open (including fruit), and also ensure your bin is sealed properly when not in use. Avoid leaving dirty dishes around and make sure the sink is cleaned out once you've used it.