If you find fruit flies in your kitchen rather than the laboratory, the buggers can quickly become a nuisance. Fruit flies are of vital importance in scientific settings, particularly in the fields of genetics and ecology, but you don't want them in your home. In order to defeat them, you must practice both prevention and active assault.
Drosophila melanogaster, the scientific name for the common fruit fly, multiply rapidly. Luckily, it’s simple to predict where they do their mating: around uncovered foods, still water and your trash. Sugary items are of particular attraction to fruit flies, so make sure to cover and refrigerate any sweet leftovers in your kitchen. Fruit flies lay their eggs in wet spots like rags and mops, so try to dry these off before hitting the sack. The rascals also have a liking for trashcans, so get one with a fully closeable pin to prevent creating a breeding ground.
If you have an infestation on your hands, you may need to step up your game and enter attack mode. For small infestations, a fly swatter is your bread and butter, although it often only provides temporary relief. For those into more hardcore fly resistance, bug zappers offer an electrical option for preventing an outbreak. When outbreaks get out of hand, you may wish to call upon spray insecticides like Raid, but try to use these products minimally as they are extremely toxic, to both your personal health and the environment. If you want to take a less aggressive tact with your fruit flies, call upon fly paper. While something of an eyesore, you won’t feel the guilt of having actively brought upon the death of your enemy.