Fruit flies only have a life cycle of a couple of days. The trick in getting rid of them is to make sure you are not hatching out fresh ones all the time. Check garbage, recycle cans (they love to breed in the dregs of pop and juice cans), house plants, overripe fruit, etc. and get rid of all spots where they might be reproducing. I have tried the various traps, but I don't think they are very effective. If there is no where for the flies to reproduce, they will die out quickly.
I recently has this problem. I put out apple cider vinegar in plastic tupperware and covered it with plastic wrap. Then you poke holes with a fork into the plastic. Leave the traps around the house for about 3 days and they should mostly all be gone.
Use either wine or red wine vinegar and put a little in a bottle with a narrow top. They will go in and drown.
This sounds silly, but it really worked for us. Use your vacuum cleaner to suck up the flies on surfaces and also in the air.
Add your voice to the conversation. Click here to answer this question.