Your first step to getting rid of fruit flies is to remove the food they eating such as rotting fruit or a trash can that needs to be rinsed out. However, once they are taking over your kitchen, your best bet to get rid of fruit flies is to use a home made solution. I suggest taking a mosatly empty wine bottle, adding a little bit of soapy water to it with the remaining wine, and leave it near the area most infested. The flies will be attracted to the sweetness of the wine, but the soap will trap them until they die. Not nice, but effective.