If the fruit flies have not completely taken over and you want a simple solution, try one of the following.
In a bowl, mix 1" of apple cider vinegar and 2 tablespoons of liquid dish soap. Place the dish in the affected area over night. The flies will be attracted to the strong smell of the apple cider vinegar and will become trapped by the dish soap.
If fruit flies are feeding on something in your drain, try vinegar ice cubes. Simply freeze vinegar in ice cube trays (you might want to dilute the vinegar a bit with water to make sure it freezes), and drop the cubes down your garbage disposal.
In a bowl, pour 1 inch of red wine. Cover it with plastic wrap, and secure the plastic with an elastic band. Poke a few holes in the plastic so the flies can get in.
Major Fruit Fly Infestation
The mother of all fruit fly traps.
Before you can lure fruit flies into the trap, you'll want to make sure you clean away all other food sources (besides the one you're using to lure them). Empty the garbage (you should do this every day), put away all food in tightly sealed containers or the fridge, get rid of soiled dish cloths, and wash your counters, sink and dirty dishes.
Now you're ready to build the fruit fly trap. Here's how:
What you'll need:
Fruit, nearly rotten is best – try an overripe banana
250 ml. pop bottle
A piece of paper
Tape
Directions:
Place the rotten fruit in the bottle. Squish it in -- the nastier the better. Use bananas, rotten berries, chunks of apple, a splash of red wine; the options are endless!)
Roll the paper into a funnel shape. Trim it if necessary and tape it together.
Put the funnel in the bottle. Seal the rim with tape.
The fruit flies will be tempted by the rotting fruit, fly in, and not be able to get out. It will take a few days to get every last one, but in time, it will completely rid you of the fruit fly infestation. Some people add a touch of dish soap so the flies die quickly; others let them finish their life cycle purging on the rotten fruit; still others choose to release them down the road. The important part is getting them out of your kitchen.