14 Plants That Effectively Repel Pesky Fruit Flies

Animals With The Shortest Lifespan
© Jordan Lye/Shutterstock.com

Written by Katarina Betterton

Published: August 1, 2023

Share on:

Advertisement


A fruit fly infestation — or even just a few here or there in the kitchen — remain a common issue in many households, especially in the summer and fall. While they aren’t harmful in nature, they might be a harbinger of unclean home conditions. It’s usually not worth calling an exterminator, but the fruit fly traps at the store can be off-putting, unnecessarily sticky, and downright gross. 

If you keep a tidy home but just can’t seem to get rid of the pesky fruit flies whizzing around your kitchen in the summer and fall, consider bringing in a plant or two that naturally repels fruit flies.

Below, discover 14 plants that effectively repel fruit flies — as well as tips for repelling fruit flies through other means, too.

Understanding Fruit Flies and Their Behavior

Fruit flies are tiny — only 1/8 of an inch. Unless you get a good look at one under a microscope, you wouldn’t even know they have distinctly-colored red eyes and a brown or light tan body. 

More than anything, fruit flies look for moist environments and overripe food. They like food waste and will feed on it whenever they get the chance. The most common places to see fruit flies in your home are, of course, the kitchen, or anywhere you keep fresh fruits and vegetables. Fruit flies may also buzz around drains and garbage disposals because they have both water and food waste. 

Under the most ideal conditions, a fruit fly will live between 40 and 50 days. This departs sharply from the myth of only 24 hours. It’s important to catch fruit fly infestations quickly because they multiply fast. Female fruit flies will lay several batches of eggs in their less-than-two-month lifespan, and each “litter” can be up to 500 eggs. 

Usually, fruit flies lay their eggs inside decaying organic material. That might mean the skin of a tomato, the flesh of a berry, or the interior of an apple.

The Power of Repellent Plants

Before humans had the technology and knowledge to manufacture bug repellent or become exterminators, populations used specific plants to accomplish tasks. One of which: keeping their food sources free of contamination from bugs. 

Depending on the plant, different characteristics or chemical compounds repel fruit flies from coming too near. Sometimes it’s the herb’s taste; other times, it’s the oils or chemicals in the herb itself that are painful or unattractive to the fly.

Repellant plants remain a handy second line of defense for households that choose to abstain from using chemical cleaning products. Besides keeping a tidy home free from rotting produce, using repellent plants provides another source of passive home health.

14 Plants That Effectively Repel Fruit Flies

Discover which plants most effectively repel pesky fruit flies, including historical favorites like basil, lavender, and rosemary.

Basil 

Top view of Greek basil in garden.

Dwarf basil looks beautiful and has a peppery flavor.

©AN NGUYEN/Shutterstock.com

Basil plants usually grow outside, so attempt to pot them in places like windowsills or other entry points to deter fruit flies from coming in. The phytochemicals in many basil subspecies will compromise the nervous system of a fruit fly if they ingest or smell too much of it. The very scent of basil’s freshly-crushed leaves will deter fruit flies — as long as it overpowers the smell of the rotting or decaying produce.

Try to pick strains of basil that are not sweet because fruit flies look for sweet scents.

Lavender 

Sunset over a violet lavender field .Valensole lavender fields, Provence, France.

Lavender’s overpowering scent wards off fruit flies.

©ESstock/Shutterstock.com

For generations, humans have used lavender to calm themselves and fall asleep. Insects like fruit flies have a different experience with lavender, though: the scent and taste are too overpowering, so they avoid it when they can.

Lavender’s phytochemicals include linalyl acetate, linalool, tannins, and caryophyllene, all of which contribute to nervous system damage in a fruit fly if ingested in significant amounts. It’s abundantly safe for humans to eat, though!

Mint

Close up of fresh green spearmint in the garden.

Spearmint grows quickly and will repel fruit flies inside and outside.

©lpjp/Shutterstock.com

No longer just a scent for the holidays, mint (and more specifically the plant peppermint) will repel fruit flies thanks to its overpowering smell of menthol. Crush up some leaves, have a full plant, or place sprigs in your fruit basket.

You can also use hybrids of the plant: watermint and spearmint will repel fruit flies too.

Lemongrass

lemongrass perennial or annual

Most insects avoid citrus-flavored or scented herbs.

©iStock.com/ATP-Photographer

Fruit flies avoid lemongrass’s phytochemicals and oils, like peppermint’s, at all costs. As a rule, many insects hate lemon-scented things, so this is an easy plant to keep at home for the continual repelling of fruit flies. 

Rosemary 

Detail of fresh rosemary herb. Rosemary herb garden. macro view.

Though fragrant to humans, rosemary has a harsh scent to fruit flies.

©Hulya Poyraz/Shutterstock.com

Rosemary has a harsh scent to fruit flies, immediately making the insect turn tail. However, there’s more to rosemary than meets the eye — and a specific reason that it repels fruit flies so well. The plant’s phytochemicals, including rosmarinic acid, camphor, and carnosic acid, make the plant bitter and naturally unappealing to many animals and insects. 

Marigold

Close up of beautiful Marigold flower (Tagetes erecta, Mexican, Aztec or African marigold) in the garden

Marigolds have a chemical that repels mosquitos as well as fruit flies.

©FunFamilyRu/Shutterstock.com

This is a perfect plant to have in the house during the summer for its color and effective chemical properties. Not only will a marigold naturally repel fruit flies; it also repels mosquitos as well! These annual flowers self-seed, so planting one means it will come back again and again.

Chrysanthemum 

orange garden mum

The pyrethrum in chrysanthemums will keep fruit flies at bay outside.

©iStock.com/sjarrell

Along the same line as marigolds, chrysanthemums have a powerful phytochemical called pyrethrum, which helps repel flies naturally. As it’s a perennial bloom, planting a chrysanthemum and caring for it to be in good health during its season will beget another bloom later that year, and again.

Bay Laurel 

Photo of bay laurel (Taurus nobles) which is the leaf most commonly used to make bay leaves.

Dried and fresh bay leaves will repel fruit flies with their strong scent.

©H. Zell / CC BY-SA 3.0 – Original / License

More commonly referred to as “bay leaves,” the plant bay laurel will deter fruit flies with its freshly-harvested leaves and stems. This use extends to other insects and arachnids, too. Bay laurels’ phytochemicals, depending on the species, find their household use as a natural pesticide. In addition to freshly-harvest leave bundles, you can crush up bay leaves and put them in a pouch. As long as you replace them to maintain the strong scent, they’ll continue acting as a natural and effective fruit fly repellent.

Garlic

Growing green garlic closeup

Garlic’s overpowering scent can repel beetles, cabbage butterflies, and fruit flies.

©Mikhail_Nau/Shutterstock.com

Vampires might not be real, but the annoyance of fruit flies is! Plants of garlic will repel fruit flies both indoors and outdoors, as well as other insects like beetles and cabbage butterflies. The strong, overpowering scent of garlic’s bulb and leaves deter flies from coming too close to the kitchen — and provide an aromatic green addition to you!

Eucalyptus 

The young, round leaves of eucalyptus will repel fruit flies if broken open to reveal their oils.

©iStock.com/Marina Denisenko

The eucalyptus plant’s phytochemical cineole has a strong smell that most insects try to avoid. Usually, it works best as a repellent when you break open the leaves and fill the air with its oils. When deciding where to position eucalyptus, doorways and windows — or other entry points you know of — make great choices.

Tansy 

Tansy is a fragrant member of the aster family

Tansy is a flowering plant that adapts well to indoor use.

©Dominicus Johannes Bergsma / CC BY-SA 4.0, via Wikimedia Commons – Original / License

While tansy does a great job of repelling fruit flies, it’s also slightly harmful to humans. If you choose this plant to have in your kitchen, make sure you wear gloves when you handle it, as its sap can cause contact dermatitis. 

Tansy pulls double-duty in the home, not only repelling fruit flies but warding off ants, ticks, and fleas as well.

Pennyroyal 

Pennyroyal plant Pennyroyal plant is a flowering plant with a mint odor.

Use pennyroyal carefully if your home has pets or young children.

©iStock.com/Kanjana Wattanakungchai

A lesser-known plant that shows effective repellent natures to fruit flies, pennyroyal can be used both fresh and dried. Fresh cutting of pennyroyal will release an oil repugnant to fruit flies and other pests, while dried sprigs in pantries do their best to keep ants away.

Like some others on the list, pennyroyal is toxic to pets and children if ingested in large amounts.

Citronella

Outdoor Citronella Plant with Floral

Keep pets away from citronella — it is toxic to them as well as fruit flies.

©Fehmi/Shutterstock.com

Citronella isn’t just a helpful candle for summer nights on the deck — it’s a grassy plant that has a powerful citrus aroma similar to lemongrass that keeps fruit flies at bay. Be careful where you place citronella, though, as it is a toxic plant to pets. Especially-curious cats are at the most risk of ingesting the plant.

Thyme

Flowering Thymus serpyllum, elfin thyme.

Botanists continue to experiment with different uses of thyme.

©iStock.com/Yuliia Bilousova

Lastly, researchers have been studying the effects of thyme on repelling insects like fruit flies and ants. Because the plant has proven effective against mosquitos and stick bugs, it may be a good candidate for a natural fruit fly repellent.

Other Ways to Repel Fruit Flies

If the plants listed above aren’t working — or if you’d like to support their repellant with other methods — try one of the following in tandem with the plants that effectively repel fruit flies to rid yourself of the pests for good.

DIY Fruit Fly Traps

The most common household DIY fruit fly trap needs just two handy ingredients: apple cider vinegar and dish soap.

Take a ramekin, bowl, or jar and fill it up about halfway with apple cider vinegar. This acts as the bait for the fruit flies. On top of the vinegar, drop a few dabs of dish soap and then cover it with a secured piece of plastic wrap. Finally, poke holes in the plastic wrap so the fruit flies can enter the trap.

Along with preventative measures, this is the most successful way to trap fruit flies.

Essential Oils

Did you know the essential oil form of the plants mentioned above has the same effect of preventing and repelling fruit flys in your home? Basil, peppermint, eucalyptus, lavender, clove, and lemongrass are the best choices if you choose to go the essential oil route.

It’s easy to do — almost easier than opting for plants in your home! Simply purchase the essential oil you want to use, dip a tea bag or cotton ball in it, and hang it around your kitchen. You can also use a professional essential oil diffuser if you have one. 

A note about using essential oils: ensure you practice proper precautions when diffusing. Peppermint essential oil is toxic to both dogs and cats, so you may want to choose another oil if you have a pet-filled home. Also, if you choose to use a diffuser, only use it for 30 to 60 minutes. A longer duration won’t make the oil work more; it will put a strain on your body instead. Lastly, don’t diffuse or use essential oils next to your gas stove, as oils are highly flammable.

Proper Food Storage

Lastly, maintaining proper food storage and waste will ensure fruit flies don’t frequent your kitchen or mysteriously spawn out of thin air. 

Because fruit flies remain attracted to overripe or rotting fruits and vegetables, it’s imperative you keep a close eye on your produce and their expiration dates. Some fruits and vegetables decay faster than others. For example, bananas, avocados, and berries will spoil much faster than an apple or watermelon. Blueberries are an exception; they last longer in the refrigerator than many other berries. Other quick-to-rot fruits and vegetables include peaches, potatoes, kale, and broccoli. 

Most of the time, the best method of preserving fruits and vegetables is to pop them in the fridge. Interestingly, some fruits and vegetables will spoil faster if placed in the fridge. Tomatoes are one such fruit: within a few days of entering the fridge, a tomato will become soft, mushy, or mealy rather than crisp and ripe.

Depending on the fruit or vegetable you’re trying to preserve, different methods exist to elongate its life. Here’s a chart of the best ways to preserve fruits and vegetables — and to keep fruit flies out of your kitchen.

ProduceWhere to StoreLifespan
RaspberriesRefrigerator.Two to three days.
BananaCounter or pantry.Two to five days.
PeachesRefrigerator.Three to five days.
KaleRefrigerator.Five to seven days.
StrawberriesRefrigerator.Five to seven days.
TomatoCounter or pantry.Seven days.
AvocadoRefrigerator.Seven to 10 days.
BroccoliRefrigerator.Seven to 10 days.
BlueberriesRefrigerator.10 to 14 days.
PotatoCounter or pantry.One to two months.

Keep to the produce’s lifespan to prevent fruit fly congregations (or worse, infestations). You’ll also avoid making you or your family potentially sick by eating fruit that might have harmful bacteria — even if it doesn’t look spoiled yet.

Plants Can Save Time, Money, and Effort

Instead of investing in fruit fly traps, consider getting a plant to repel fruit flies from your outdoor spaces, indoor kitchens, and anywhere an infestation seems to occur. These natural remedies provide beauty as well as function. When you do choose a plant to act as a fruit fly deterrent, ensure it’s safe for use among all your household’s needs and allergies.


Share this post on:
About the Author

Katarina is a writer at A-Z Animals where her primary focus is on dogs, travel, and unique aspects about towns, cities, and countries in the world. Katarina has been writing professionally for eight years. She secured two Bachelors degrees — in PR and Advertising — in 2017 from Rowan University and is currently working toward a Master's degree in creative writing. Katarina also volunteers for her local animal shelter and plans vacations across the globe for her friend group. A resident of Ohio, Katarina enjoys writing fiction novels, gardening, and working to train her three dogs to speak using "talk" buttons.

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