Red-eyed gnats, also known as fruit flies, are a common household pest; they are also known by names such as fungus flies, drain flies and sewer flies. Infestations of fruit flies are caused by providing them with suitable breeding areas, such as fruit. Flies have a relatively short life cycle (about 14 days) making it easy for a small problem to become a large infestation in a short amount of time. To successfully rid your home of these pests, not only do you need to kill the flies, but you must remove their chosen environment as well.
Locate the source of the fly infestation. This can be ripe fruit, rotten food, or other garbage. It is important to first locate the source of the problem so that the trap can be placed nearby and the problem can be removed, preventing further infestation.
Place bait in the jar. The bait should at least cover the bottom of the jar.
Place the plastic bag over the jar and secure it with a rubber band. Cut a small hole in the tip of the bag. Flies will enter here and be unable to find a way out.
Place the fruit fly trap near the source of infestation. Leave it for a day, or until all the flies are trapped. Dispose of the dead flies.