Put all of your food away. It doesn't matter how many fruit flies you capture in your soda-bottle trap; if you leave food on the counter or dirty dishes in the sink, you will continue to find flies in your home.
Find an empty 2-liter soda bottle.
Rinse your soda bottle with clean water. Fill the bottle with 3" of water. Replace the lid. Vigorously shake the bottle for 30 seconds. Remove the lid, pour out the water and allow the soda bottle to dry.
Pour cider vinegar into the bottle. Use just enough to cover the bottom of your soda-bottle trap. The smell will lure the fruit flies into your trap.
Set the soda bottle onto your kitchen counter, or anywhere you have noticed a large amount of fruit flies. Make sure you haven't placed it somewhere where it can be knocked over by a family pet.
Leave the trap out overnight.
The next morning, check your soda-bottle trap. There should be several fruit flies in the bottle that were attracted by the smell of the vinegar, entered the bottle and were unable to get out.
Replace the cap on the top of the bottle and throw your trap away.
If you live in a state that has a deposit on soda bottles, you can simply empty the container outside and reuse it.