You may see fruit flies year round, but with the coming of spring they are worse. You spray, you hang sticky traps, you swat but these things can be difficult to get rid of. Recycle 2 liter (or other size) drink bottles into a diy fruit fly trap. It’s cheap, quick, easy, and non-toxic.
Cut the bottle just above the label. Add some vinegar, slip the opening into the bottom, place it where you see the fruit flies. Simple. (Illustration below article) To hang, punch holes through both pieces (opposite each other) and knot a string in each. Since as soda bottle opening is fairly large, some may escape. To lessen that chance, you can make a funnel out of lightweight cardboard and slip it into the mouth of the bottle to make the entrance point smaller.
This trap (minus the cardboard funnel) should also work for regular flies. Replace the vinegar with water and add a small amount of meat. It may take about 24-48 hours for it to start working as the meat needs to, well, start to rot. I am thinking this ought to work for yellow jackets as well.
Regardless of what pest you need to trap, experiment with different “baits” to see which will work best for you. (Try to avoid harming honey bees – their population has declined greatly.)