You can reduce the amount of fruit flies that are freely flying around in your house by making traps to contain them (there is much information online about this), but you will always have some around. It is just inevitable.