how to keep fruit flies away from plants

Fruit Flies Hate These 7 Plants (But You’ll Love Them)

Fruit flies seem to have radar for ripe bananas and forgotten wine glasses, don’t they? Before you know it, your kitchen feels like it’s hosting a fruit fly convention. Instead of reaching for harsh sprays, try a simpler, natural fix: plants that repel fruit flies. Certain herbs and houseplants don’t just brighten up your space. They quietly get to work, sending those tiny pests packing.

how to keep fruit flies away from plants

Fruit flies may be tiny, but they reproduce like it’s their full-time job. A single female can lay hundreds of eggs in overripe fruit, drains, or even the bottom of your recycling bin. In just 10 days, those eggs can turn into a fresh swarm of adults, ready to take over your kitchen. No wonder it feels like they show up overnight.And here’s the kicker: you can scrub your counters, take out the trash, and still end up with an unwanted fruit fly reunion. They hitch rides on your groceries, and once they’re inside, they’ll sniff out even the tiniest bit of fermenting food.

Why Plants Are a Natural Way to Repel Fruit Flies

While fruit flies love sweet, decaying smells, they can’t stand strong, fragrant plants like basil, peppermint, and lavender. These plants release natural oils that are harmless to us but offensive to pests. Think of it as putting up a natural “keep out” sign.That’s why adding the right plants to your kitchen, patio, or garden can make such a difference. They pull double duty: pretty to look at, handy for cooking, and tough on fruit flies.So, ready to put those pests in their place? Here are 7 plants that can help you turn your home into a fruit-fly-free haven.

1. Basil: A Kitchen Favorite That Sends Flies Packing

plants that repel fruit flies basil plant caprese pesto margherita pizza

Basil isn’t just for pizza night or fresh summer pasta. It’s also one of the easiest ways to tell fruit flies (and even ants and mosquitoes) to buzz off. Those little pests can’t handle basil’s strong aroma, but lucky for us, it smells and tastes amazing.

You can grow basil indoors in a sunny kitchen window or outside in pots and garden beds. Just give it warm temps, partial shade, and well-drained soil. Pro tip: too much direct sun can scorch the leaves, so think “gentle sunshine.”

One more reason to love it: basil is safe for cats and dogs, so you don’t have to stress if a curious pet decides to nibble a leaf. And here’s the bonus: having basil within arm’s reach means you’re always ready for caprese salad, pesto, or tossing a handful into your favorite dish.

2. Peppermint: Refreshing for You, Repelling for Pests

what repels fruit flies mint spearmint fresh herb watermelon salad mojito tiki cocktail tea iced

Most of us love the crisp, cool scent of peppermint. Fruit flies, not so much. In fact, it’s one smell that will send them buzzing in the opposite direction.

Mint is wonderfully easy to grow, whether you keep it on a sunny kitchen windowsill or plant it outside. Just know this: mint doesn’t exactly play well with others. Once it’s in the ground, it tends to sprawl and take over every inch of soil it can reach. The smarter approach? Plant it in containers where you can control the spread, then trim it often for a steady supply of lush, fragrant leaves.

That steady supply comes in handy. Fresh peppermint leaves can jazz up iced tea, brighten summer cocktails, or even soothe an upset stomach when steeped into tea. Just one caution: peppermint is toxic to cats and dogs, so if you’ve got curious pets, this may not be the plant for you.

3. Lavender: A Fragrant Barrier Against Fruit Flies

lavender repels fruit flies bunches sachets tea garnish

When it comes to distinctive scents, lavender may just take the crown. You’ll find it everywhere: soap, candles, detergents, even in baked goods. Many of us love its light, calming fragrance. Fruit flies? Not so much. They can’t stand it. In fact, lavender also discourages spiders, rodents, and even deer.

Lavender is typically grown outdoors, but it does well in containers that can be brought inside over the winter. It’s hardy, thrives in full sun, and prefers well-drained soil. Once it’s established, it’s tough to kill. If you’d like to harness its fly-repelling power indoors, cut bunches of dried lavender, tie them together, and hang them in your kitchen or pantry.

For an extra step, lavender essential oil can be mixed with water and spritzed around the house as a natural refresher. Not only does this repel fruit flies, but it can also double as a stress reliever, perfect for unwinding after a long day. Here’s one I like:

A quick note: lavender is toxic to cats and dogs, so if you’ve got furry family members who like to nibble on plants, this might not be the best option for you.

4. Rosemary: A Hardy Herb with Double Duty

rosemary keeps fruit flies away garnish potatoes salmon steak cocktail gin

Rosemary is one of those plants that works overtime. It’s easy to grow indoors or outside as long as it gets full sun and well-draining soil. A little water and attention, and it’ll thrive. Beyond keeping fruit flies at bay, rosemary is a kitchen all-star. You can snip a sprig to toss into roasted potatoes, homemade bread, or even a cocktail (yes, rosemary pairs beautifully with gin or lemonade).

Place pots of rosemary near doorways, windows, or your patio table, and it acts like a natural bouncer for fruit flies, sending them away before they can sneak inside.

One more bonus: rosemary is non-toxic to cats and dogs, so pet parents can breathe easy. And if you’re looking for a low-maintenance, practical plant that looks good, smells amazing, and earns its keep in both your kitchen and pest defense plan. This one’s a winner.

5. Eucalyptus: Aromatic Oil That Drives Flies Away

eucalyptus shower keep fruit flies away repel window shower

Eucalyptus is one of those plants that smells like a spa but works like a bouncer. Its leaves are loaded with aromatic oils, long valued in cough drops, lozenges, and rubs for soothing sore throats, easing congestion, and even calming aches. A whiff of eucalyptus can be relaxing for us, but for fruit flies? It’s the exact opposite. They can’t stand it.

Whether you grow eucalyptus outdoors or keep a potted plant indoors, its natural oils act as a strong deterrent. Give it a sunny spot with warm temps (65–75°F) and a little humidity, and it’ll thrive while quietly keeping pests at bay.

Here’s a bonus tip: you can snip a few branches, hang them in your shower, and enjoy an at-home spa experience as the steam releases those invigorating oils. Just keep in mind, eucalyptus is toxic to cats and dogs, so if you’ve got furry friends, this may be one to admire from a distance.

6. Venus Fly Trap: Nature’s Tiny Bug Catcher

venus fly trap to repel fruit flies

Technically, the Venus Fly Trap doesn’t repel fruit flies. It lures them in. This quirky little plant gives off a sweet smell, tricking flies into thinking they’ve stumbled on fresh flowers. The moment an unsuspecting fruit fly lands on its “trigger hairs,” snap! The trap closes, and suddenly your uninvited guest becomes dinner.

Now, let’s be honest: a Venus Fly Trap isn’t going to wipe out an entire fruit fly army. But if you’ve got that one rogue flyer circling your kitchen like it owns the place, Venus is more than happy to handle it.

Care is surprisingly simple. These plants do best in a sunny windowsill with acidic, well-draining soil. Because their roots grow deeper than you’d expect, choose a slightly taller container to keep them comfortable. And unlike some of the other plants on this list, Venus Fly Traps are non-toxic to cats and dogs, so you can let your furry friends sniff around without worry.

Pro tip: If you’ve got kids or grandkids, a Venus Fly Trap can also double as a fun science experiment. Watching it snap shut never gets old, and it’s a great way to spark curiosity about nature.

7. Clove Tree: Spice Up Your Defense Against Fruit Flies

clove tree to repel fruit flies orange citrus apples dried

Fruit flies may be stubborn little things, but they want nothing to do with cloves. Those warm, spicy-scented buds you sprinkle into marinades or holiday cider? They’re actually dried flower buds from the clove tree, harvested before they’ve had a chance to bloom.

Growing your own clove tree takes a little patience. It prefers full sun, humidity, and temps above 50°F, but it can be done both outdoors and indoors if you’ve got the right spot. Once the buds turn pink (but before they open), you’ll harvest, dry, and have your very own homegrown supply.

Here’s the fun part: once you’ve got cloves, you can put them to work as natural fruit fly repellents. Take an orange, lemon, or lime, poke 8–10 cloves into it, and leave it on display. Not only does it keep fruit flies at bay, but it also doubles as a fragrant, old-world air freshener. (An apple works too, though citrus tends to last longer.)

Too much work to grow your own clove tree? Pick up a can of whole cloves at the supermarket or online. Cloves are on the list of items that can be toxic to cats and dogs though, so skip this if you have pets.

Tips for Using Plants to Keep Your Home Fruit-Fly-Free

The beauty of using plants to keep fruit flies away is that you’re solving a pesky problem without harsh chemicals and you’re making your home a little greener in the process. Keep in mind: no single plant is a magic shield. The real trick is consistency. Place repellent plants where fruit flies love to linger (near your fruit bowl, compost bin, or kitchen windows), give them the sunlight and care they need, and refresh your setup as needed

 

Question: What’s your go-to trick for keeping fruit flies out of your kitchen? Plants, traps, or something else? Share in the comments below.


EverydayCheapskate™ is reader-supported. We participate in the Amazon Services LLC Associates Program and other affiliate advertising programs, designed to provide a means for us to earn from qualifying purchases, at no cost to you.

More from Everyday Cheapskate

Free Summer Activities for Kids Who Are So Bored little girl running through the sprinklers
backyard bbq party for memorial day menu planning
open refrigerator in kitchen reduce food waste in summer
homemade beeswax furniture polish woman wiping cutting board
woman walking with basket down store aisle grocery items with the biggest price increases
japanese chicken wings recipe
northern colorado home backyard upgrades on a budget two comfortable chairs and patio umbrella for shade
when to open and close windows to keep house cool
frugal habits that save money


Please keep your comments positive, encouraging, helpful, brief,
and on-topic in keeping with EC Commenting Guidelines



Last update on 2026-05-21 / Affiliate links / Images from Amazon Product Advertising API

Caught yourself reading all the way 'til the end? Why not share with a friend.

9 replies
  1. Barbara says:

    Drain flies are the bane of my exix
    Stance

    Drain flies/gnats/fruit flies make my summers miserable. They literally get into everything and hang out around my laptop as well. I’ve found 2 things that help: a product called Drain Gel and the little blue light bug catchers with the sticky card. Doesn’t take them away but makes a dent iin the population. Now if I could just figure out how to keep them out of my fridge and freezer, I’d be a happy camper.

    Reply
  2. Patti Roy says:

    I use a method I’ve known for years, and I’m not sure where I first came across it, but it works like a charm for fruit flies. The key is to lure them into a place from which they can’t escape. Use a glass, a vase, or any container you can top off with a piece of plastic wrap. Add a bit of vinegar, or old wine from the glass that’s loaded with them, a piece of apple, melon, peach pit, or anything that draws them in. Top the container with the plastic wrap, and poke a few tiny holes thru the wrap. They are lured in, trapped, and are easy to dispose of. Most recently, I have been using the little plastic take-out cups that they put sauces in, or that are used for jello shots. I don’t like the look of the thing, so I set it above the sink in a pretty bowl. Only I know it’s there. And when the infestation seems to be over, I can just toss the contents outside, and put the whole thing in recycle.

    Reply
  3. Lida says:

    Well, I do not have fruit flies. I do have for the first time ever what I believe are gnats. Is there a similar way to get rid of them? What could I have done to invite them into my home?

    Reply
  4. linda says:

    i keep my fruit bowls covered and wash any dish that had fruit, fruit sauce or juice in it immediately after use, or put it in the dishwasher. now i have even more reason to love my basil plant that grows so beautifully, and to try again with the rosemary. i love it, but it’s not too thrilled with me.

    Reply
  5. jd wolfe says:

    best is to not get them. i place all veg/fruit debris in a plastic container in the frig until it goes outside to trash/compost. no more fruitflies.

    Reply
  6. Dee says:

    Thank you so much for these methods. I most appreciate your guidance as to which of these plants are toxic for dogs and cats, as we have three cats in the home, as well as a feral colony close by.

    Reply
  7. Linda Pries says:

    I prefer to trap fruit flies. A Venus Flytrap won’t help control fruit flies because they are too small to trigger the hairs that close it. Also they do not make a very good house plant, they grow best outdoors in full, strong sunlight. I DO keep a couple of tropical sundew and butterwort plants under a strong plant light. The flies don’t stand a chance and, with enough light and sitting constantly in distilled water, these plants grow well year round indoors.

    Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *