The fastest way to get rid of fruit flies is to attack the problem from both sides: Remove their food source, then trap the flies that remain. After experimenting with different fruits, vinegars, containers, and funnel sizes, I've determined the best homemade fruit fly trap is a simple paper funnel tucked into a jar with overripe strawberries, cut stone fruit, or banana peels, plus a splash of fruity vinegar. There’s a chance the gnats you see flying around aren’t fruit flies at all.