How to Get Rid of Fruit Flies Once and For All

Written by Kirstin Harrington
Published: March 27, 2023
© Anne Webber/
Share this post on:


There are few things as annoying and dreadful as a fruit fly infestation. Whether you have them in your rental apartment or your own home, these pesky insects can not only ruin your day but make it unsanitary around your house. 

Below we’ll deep dive into everything there is to know when it comes to getting rid of fruit flies for good. We’ve included helpful lifestyle changes, tried and true products, and information on what causes fruit fly infestations in the first place. 

What Are Fruit Flies 

The fruit fly, also known as Drosophila melanogaster, is a species of common housefly that may be identified by its red eyes, brown thorax, and black abdomen. Its intense affinity to ripening or decaying fruit, which serves as both a food source and a location for egg-laying, is how it got its moniker. 

Fruit flies mature at 3 to 4 mm in length and live for 40 to 50 days. They can be a nuisance inside a home any time of year, but they are most active during the harvesting season in autumn. 

As you might expect, fruit flies are regulars in the produce departments of grocery stores. They also like to hang out around dumpsters, trash cans, and other places where they can get a free, delicious meal.

Fruit flies have the standard egg-larvae-pupae-adult four-stage insect reproductive system. The larvae start eating decaying fruit as soon as they hatch. The entire transition takes anywhere from one to two weeks to complete. One female fruit fly can produce up to 500 eggs in her brief lifespan, which is what makes them so challenging to eradicate.

Close up of a fruit fly on a banana
One female fruit fly can produce up to 500 eggs in her brief lifespan.


What Attracts Fruit Flies?

We know… it’s hard to beat the refreshing flavors of fresh fruit any time of year. Although it’s part of a healthy diet, fruit is also an open invitation to these pesky critters to invade your home! 

If they detect a food source, fruit flies migrate into the kitchen, bathroom, and basement. They are drawn to the overripe fruit on the table and any fermenting material in drains, mops, and garbage cans. Fruit flies could also be brought in by unwary householders using garden produce. 

These insects are drawn to the fragrance of ripening fruit and decaying vegetables. While fruit flies can be a nuisance throughout the year if food is plentiful, they are often more likely to be an indoor issue in the summer and fall. They might, however, be an issue all year long.

Fruit flies on overripe pears
Fruit flies are drawn to overripe fruit as well as fermenting material in drains, mops, and garbage cans.

© Unbehauen

Fruit Flies vs. Gnats

There are a few differences between these tiny, flying insects that are sometimes confused with one another. Fruit flies, for example, have spherical bodies that might be brown to black with big, red eyes. Since they lack biting mouthpieces, they only eat ripe fruit. 

On the other hand, fungus gnats have lengthy, black bodies and drooping legs, giving them the appearance of little mosquitoes. If you have gnats in your home, you should anticipate some really irritating bug bites because female gnats feed on blood.

By the way, gnats enter your home through the soil, so your newly purchased potted plant might be to blame. 

gnat vs. fruit fly
Fungus gnats have lengthy, black bodies and drooping legs, giving them the appearance of little mosquitoes.

Best Treatments for Fruit Flies 

Luckily, there are numerous approaches to eliminating fruit flies. It is actually simple and quick to get rid of these pests, whether using homemade or store-bought solutions. Once you’ve eliminated them, repel them by routinely washing your sink drains and counters, as well as by promptly and thoroughly wiping up spills. 

Immediately after you arrive home from the grocery store, wash your produce to get rid of any possible eggs that may have been laid. Last but not least, use or discard any product that is decaying or too ripe. Here’s how to eliminate fruit flies as soon as possible in your home now that you are aware of the best methods going forward.

Green Gobbler Fruit Fly Killer

Your sewer pipes may become a breeding ground for fruit flies. Hence, in addition to installing traps, you should treat your pipes if you’re dealing with an infestation. The Green Gobbler gel’s citronella base instantly kills fruit flies, drain flies, and sewer flies when you pour a cup of it into the drain. 

Since the formula is non-caustic and non-corrosive, it won’t erode the pipes, drains, garbage disposal, or septic system. This product has received more than 4,400 five-star ratings on Amazon from delighted customers who call it “wonderful” and ” worth every cent.”

A Kitchen Concoction 

Mix 2 teaspoons of granulated sugar with 1/2 cup of milk. The sugar should dissolve after a few minutes of heating on the stove or in the microwave, with continuous stirring. Put the contents into a bowl with a few drops of dish soap to leave the liquid’s surface a little bit sticky and prevent fruit flies from escaping. 

Add some black pepper on top. You might find it challenging to distinguish between flecks of black pepper and potential victims, but once you try this approach, you’ll be pleasantly surprised by how few fruit flies are left in your house.

Pop Open a Cold One

That’s right – beer can steer fruit flies out of your home! Place a rotten or overripe banana chunk in a jar. Pour just enough beer to cover the banana in it. Make a tiny hole in the bottom of a coffee filter that is fashioned like a cone. Place it atop the jar and fold the paper over the jar’s edges to keep it in place and capture the fruit flies.

Rotten Fruit

Try utilizing the decaying fruit that initially attracted them. Put some rotten fruit that has been cut into a bowl. Using a rubber band, firmly wrap plastic wrap around the bowl. Make a few holes in the plastic using a needle or toothpick. Fruit flies should be able to crawl through the openings, but they should not be able to escape because of their size.

Window Fly Traps

Although some reviews particularly say it works well on fruit flies, this product that sticks to your window isn’t designed to trap them. In fact, one review with one star still stated the product completely eliminated their fruit flies. Hence, while this treatment may not be the best choice for other insect invaders, it does appear to be an efficient, cost-effective remedy for fruit flies. 

Best for Windows
MaxGuard Window Fly Traps
  • Easy to apply
  • Traps are transparent
  • Chemical-free and unscented
  • Long-lasting
Check Amazon

Yellow Sticky Traps

While this product is designed to safeguard your plants, several users assert that it also does a fantastic job of controlling fruit fly populations. You can tie them with thread-like traditional fly paper or position them next to fruit or other increased areas. 

One of the best fruit fly remedies available, setting them up could need a little creativity. This product is safe for anyone with children or pets because it is created with nontoxic adhesive and is pesticide-free.

Best for Plant Protection
Fruit Fly Traps Fungus Gnat Traps
  • UV resistant
  • Waterproof
  • Not harmful to dogs and other pets
  • Easy to insert in plant box
Check Amazon

Apple Cider Vinegar 

Put apple cider vinegar in a dish or cup, wrap it in plastic, fasten the sides with an elastic band, and pierce a few small holes in the top. Fruit flies will be drawn to the vinegar, and once inside, they won’t be able to get out due to the plastic wrap covering.

Another option is to mix dish soap with apple cider vinegar. Dish soap and vinegar should be combined well in a container. Flies are drawn to the bittersweetness of the apple cider vinegar, and the dish soap serves to lower the surface tension of the liquid, enabling the flies to immediately dive into the solution upon exploring it and becoming trapped within.

An Electronic Solution

Compared to other options on this list, The Katchy may require a larger initial expense, but its consumers appear to be satisfied. By enticing insects with its UV light, capturing them in an air current, and driving them down into an adhesive glue board, this automatic method traps insects. 

People adore sharing photos of their adhesive pads with insect markings. In addition, it appears to trap larger insects like house flies and mosquitoes. Several users claim that adding a few drops of apple cider vinegar to the bottom as an added incentive improves their results.

Best for Being Buzz-Free
Katchy Indoor Insect Trap
  • Uses UV light to attract insects
  • Replaceable sticky mat traps insect
  • Easy to use
  • Easy to clean
Check Amazon

The Featured Image

Apples left out in the open have been covered with fruit flies, attracted to their juice
Apples left out in the open have been covered with fruit flies, attracted to their juice
© Anne Webber/

Share this post on:
About the Author

When she's not busy playing with her several guinea pigs or her cat Finlay Kirstin is writing articles to help other pet owners. She's also a REALTOR® in the Twin Cities and is passionate about social justice. There's nothing that beats a rainy day with a warm cup of tea and Frank Sinatra on vinyl for this millennial.

Thank you for reading! Have some feedback for us? Contact the AZ Animals editorial team.