Rotten fruit is a siren song to the fruit fly. People have been writing about ways to get rid of fruit flies since fruit, flies, pens and paper were created.
Some say you should refrigerate all fruit. Others say you should buy commercial traps.
But there are some people who are one hundred per cent sure that you can get rid of fruit flies by pouring them a nice glass of wine.
But we have the end-all, be-all, now-and-forever answer thanks to Todd Schlenke, assistant professor of biology at Emory University, who spends all day studying these pesky pests.
Schlenke works with the genus Drosophila—as opposed to the larger Mediterranean fruit flies that live in orchards—and studies their immune systems and resistance to insecticides.
Fruit flies may be tiny, but they have a powerful sense of smell and pick up on "odor plumes" that emanate from your home.
"Fruit flies spend their whole lives searching for the smell of rotting fruit, then get in through cracks in the door or however the smell is getting out of your house," Schlenke says.
"Fruit flies don't actually eat fruit, despite the name. They eat the fungus or rot that grows on the fruit. So the best thing is to not let your fruit rot."
According to Schlenke, a brown banana isn't a problem—it's fruit that's molding or visibly decaying in your kitchen that attracts the flies.
If fruit is left to rot for long periods of time, fruit flies can lay and hatch eggs on it.
"It's rare that flies are reproducing in your house unless you have rotting fruit around a lot," he says.
"In the best conditions it takes 10 days to go through their whole cycle from larvae to pupae to metamorphosis."