What most naturally follows?

How to get rid of flies in the kitchen
Eliminate the obvious sources of attraction for fruit flies.
Place ripened fruit and vegetables out of sight and into the refrigerator to prevent fruit flies from having a breeding source. Throw any rotten produce away.
Empty recycling bins and trash cans regularly to avoid fruit flies and houseflies. Clean the sides and bottom of the garbage can and bin so that they are free of food and juices on their surfaces.