There are a number of techniques for controlling fruit flies in the kitchen, including methods for preventing infestations and for quickly ending them. It is important to identify flies accurately before beginning an eradication campaign, as techniques effective for fruit flies may not work with other species. Fruit flies are small and tend to be attracted to fruit and sweet things left out on the counter. They also tend to be more common in the fall.
To prevent a fruit fly infestation, it is important to remove sources of food and water. Leaks and other potential avenues for moisture should be addressed. This will also cut down on ants and other unwanted visitors. If fresh fruit needs to be left out and it cannot be sealed in containers, it should be kept in a screened container to keep flies out. Screening any open windows is also recommended to keep fruit flies and other insects out of the house. Keeping the kitchen scrupulously clean and thoroughly rinsing all recycling, especially soda cans and bottles, will also help. This eliminates potential attractions, making a kitchen less interesting for fruit flies.
For people who develop a problem with fruit flies in the kitchen, fly paper can help trap flies for removal. Traps are also helpful; a very simple trap can be made by pouring a few ounces of vinegar or putting a small piece of fruit into a jar and placing a paper funnel, small opening down, over it. The flies can enter the funnel but have difficulty escaping. When the trap is full, the fruit flies can be taken outside.
Insecticide is also an option, but it must be used carefully. Chemical sprays can be dangerous to children and pets. Baited fly traps should be kept away from food and out of reach of toddlers and animals for safety, and they should also be emptied promptly to avoid a buildup of dead flies.
Drains are sometimes targeted as a source or attractant for fruit flies in the kitchen. Some bugs do breed in drains, but more commonly, trapped organic material in the drain lures flies, and people think the flies are coming from the drains because they see them hovering around the openings. An enzymatic cleaner can be poured into the drain to dissolve caked food and allow it to be flushed. Pouring baking soda and vinegar down the drain and following with a boiling water rinse can also be effective.