Have you ever unpeeled a banana and found tiny flies crawling around it, or had other produce swarmed by insects? You might be experiencing an influx of fruit flies (Drosophila melanogaster), which typically show up in the summer and fall. Don’t worry — there are a few easy and effective ways to get rid of these pesky bugs.
What Are Fruit Flies?

Fruit flies are more prominent in the summer and fall.
©Ant Cooper/Shutterstock.com
Fruit flies are one of the most damaging pests of fruits and vegetables, according to the U.S. Department of Agriculture’s Animal and Plant Health Inspection Service. These tiny bugs attack over 400 different types of plants and have been known to destroy entire crops, disrupt trade, and cause major financial loss.
There are several different species of fruit flies (more than 4,000!). The common fruit fly, which is among the most researched animals in the world, feeds on fruits, leaves, meat, and other organic matter. It only grows to about 0.1 to 0.2 inches in length and looks similar to regular houseflies, with a large head and eyes, a tube-shaped abdomen, and a pair of wings. They also have bright red eyes, a tan or brown body, and black rings along their abdomen.
The European Cherry Fruit Fly (Rhagoletis cerasi L.) eats ripening cherries and makes them rot. It’s found throughout Europe and Asia and has been in the U.S. since 2017.
The Mediterranean Fruit Fly (Ceratitis capitata) is considered one of the most damaging agricultural pests in the world and invades apples, avocados, bell peppers, melons, tomatoes, and other fruits, nuts, and vegetables. It is established in the Mediterranean region, parts of Africa, South America, and Hawaii, but it is not established in the continental United States, where outbreaks are quickly eradicated.
The Mexican Fruit Fly (Anastrepha ludens) infects 50 types of fruits and vegetables, including citrus and mango. It has been detected sporadically in California since the 1950s but is not established there, and it continues to pose a threat to Texas’s citrus industry and other crops.
The Oriental Fruit Fly (Bactrocera dorsalis) destroys more than 400 types of fruits and vegetables, including apricots, cherries, figs, and tomatoes. It is found in Southern Asia, Africa, and established in Hawaii; occasional outbreaks occur in the U.S. mainland but are not considered established populations.
How Do They Spread?

Fruit fly larvae will feed on the inside of fruit.
According to the National Fruit Fly Council, female fruit flies will lay anywhere between 1 and 20 eggs in maturing and ripening produce at a time, and can lay several batches of eggs in their lifetime, sometimes for a total of 500 eggs. Larvae (also known as maggots) will hatch from the eggs in a few days. They grow by feeding on the inside of the fruit. Between their destruction and the bacteria left behind by the mother fruit fly, the fruit quickly begins to rot and will fall from the tree quickly than usual.
After the fruit has fallen to the ground, the larvae will leave the fruit and burrow into the soil, where they will transform into hard pupae. Finally, the fruit fly will come out of the ground and search for more fruit to eat. You will likely find them in shady areas, feeding on trees, or laying eggs in fruits and vegetables. The fruit fly’s average lifespan is 40 to 50 days, so it’s always best to try to get rid of them quickly.
But Why Are They in My House?

Clean inside trash cans and garbage disposals to ensure you get rid of all fruit flies and eggs.
©Anne Webber/Shutterstock.com
It’s simple: fruit flies are attracted to food sources. They’ll fly in through an open door or window and can also hide inside fruit you bring home from the supermarket. They will typically feed on fermenting foods left outside of the fridge and lay eggs.
“They don’t just magically appear like most people think they do,” Jody Green, member and contributor to the journals of the Entomological Society of America, previously told USA Today. “But you can find them inside when you have fermenting foods. … There’s some kind of favorable condition creating this infestation.”
So, your best bet for getting rid of fruit flies is to remove the soiled produce that attracts them. If you aren’t eating fruit quickly enough, you can freeze it for later use. And, make sure to check new produce for overripe spots that could attract flies. Cleaning out trash cans, garbage disposals, and sinks can also help remove any residual food that might attract fruit flies.
More Ways to Eliminate and Prevent Fruit Flies

Homemade fruit fly traps are easy to make and can help kill these pests.
©nkula/Shutterstock.com
Regular cleaning habits will go a long way, but if you need more help getting rid of fruit flies, there are many plants that can naturally repel these pests. For example, lavender is overpowering for fruit flies and can cause nervous system damage if they eat a significant amount, so they will avoid it. Other fruit fly repellents include basil, peppermint, lemongrass, rosemary, marigold, and chrysanthemum, among others.
You can also create your own fly traps made up of white wine vinegar, apple cider vinegar, and a few drops of dish soap to help attract and trap fruit flies. You can even put an overripe slice of fruit inside to draw them in. If that doesn’t work, you can use stronger chemicals, like bleach, to kill fruit flies or contact a pest exterminator for help.