Summarize this article in one sentence.
Fruit flies lay their eggs places that provide food and moisture, such as rotting fruit and dank sinks or garbage cans. To get rid of the eggs, you'll need to figure out where the flies' food sources are in your kitchen. Bowls or bags of aging fruit are an obvious culprit. Even if your fruit is brand new, the container you're storing it in might have residue from old produce that's still attracting fruit flies. If you keep compost in your kitchen, that may be a food source for fruit flies. An open bag of recyclables can be attractive to fruit flies, especially if it contains un-rinsed beer or soda cans. When did you last wash your garbage can? Even if you take out the trash frequently, the receptacle itself could be the source of the problem. Kitchen sink drains often harbor fruit flies, since food bits can get trapped in there and start to rot. Damp sponges and mops can also be breeding grounds for fruit flies. When you have a fruit fly problem, don't leave fruit exposed at room temperature in your kitchen. Store it in a closed brown bag or keep it in the refrigerator until you've taken care of the fruit flies. One piece of overripe fruit can perpetuate the infestation by providing a great place for fruit flies to breed. Don't throw fruit scraps in the trash. Unless you take your trash out daily, avoid throwing peach pits, apple cores and other fruit scraps in the trash in your kitchen, since they'll end up as breeding grounds for fruit flies. Take scraps directly outside to a compost pile or outdoor bin. Your trash can, recycling bin, and compost bin could be harboring fruit fly eggs. Any waste receptacle you keep indoors should be cleaned with hot, soapy water as soon as you notice the infestation. Take out your trash, recycling or compost often to prevent the problem from recurring. Continue washing the containers every week or so, especially during the late summer months when fruit fly populations are high. Rinse bottles and other containers with hot water before you throw them in the bin. Residue from these items can spill on your trash receptacles and make the fruit fly problem worse. You should also make sure all of your waste receptacles have tight-fitting lids. You can check to see if your drain is a fruit fly breeding ground by covering it with a piece of plastic wrap spread with a thin layer of honey. Place it over the drain honey-side down, then come back in an hour or so. If you see fruit flies stuck to the honey, your drain is part of the problem. Make sure your drain is operating properly. If it's backed up, or if your garbage disposal isn't working, you might have bits of rotting fruit attracting flies down there. To kill eggs, pour a pot of boiling soapy water down the drain. Use a brush to scrub around the sides of the drain. Don't pour bleach down your drain. It doesn't work, and it's harmful to the environment. Old sponges, damp mops, old rags, and any other items you use to wipe your counters and floors might contain fruit fly eggs. Throw them away or wash them using the hot cycle on your washing machine. Use hot, soapy water to clean your countertops. Make sure you get all the cracks and crevices where fruit flies might like to congregate. Clean your cabinets, pantry, and any other places where you've stored fruit, juices, or other sugary items. Check the floor, too. If a drink got spilled under the refrigerator, for instance, that might be part of the problem. Clean any areas that feel sticky. Keep kitchen surfaces clean every day. Make sure everything is wiped down as part of your cleanup after each meal. Wash all dishes after use. Avoid leaving dishes just sitting around dirty (if you have a dishwasher, pop them in there and shut the door to await a wash).
Figure out where they're breeding. Store your produce carefully. Wash your waste receptacles. Clean your drain. Throw out other potential breeding sources. Wipe down the surfaces in your kitchen.