If you are desperate to kill fruit flies, and Lord knows I am, then the best way is to get a little dish, pour in some apple cider vinegar, and stir in a drop or two of dishwasher soap.
The soap changes the surface tension of the vinegar. The flies come in to drink the vinegar, they drown, and I cheer. Little bastards can’t help themselves. They pile on and die in great and glorious numbers.
I am not normally a monster but I have my moments.