It's claimed all you need to get rid of flies is a cucumber – myth or fact? We've put it to the test to find out

With summer on its way, are you gearing up for the swarms of house flies like me? The answer could be hiding in our vegetable drawers

composite of sliced cucumber and a house fly on a leaf
(Image credit: Getty Images)

Once the weather starts to pick up, one of the many little pleasures in life is being able to welcome the fresh air in by opening your windows. However, that small joy is usually swiftly crushed by the sudden swarm of flies that also flows into your home.

If you're anything like me, you'll be working overtime to get rid of flies in your home the second the warm weather hits. More often than not, my conservatory becomes a haven for large house flies and gnats then days later, my windowsills resemble something of an insect graveyard.

With that in mind, when I spotted speculation online that cucumbers are said to be a natural fly deterrent, I was surprised, somewhat sceptical, but more than anything, curious. Can slices of my favourite salad ingredient really help curb this pest infestation?

Can you get rid of flies with a cucumber?

I've tried many a home hack, from using denture tablets to prolong my flowers' life to repurposing teabags for improving plant drainage, I've done it all. And yet, when I heard that the smell from sliced cucumber is being recommended as a fly deterrent, I couldn't help but second-guess it.

Not only did I try it for myself, but I asked a trusted expert about the so-called 'hack' too.

With good faith, I displayed a plate of sliced cucumber (eight slices to be specific) in my most fly-populated room in the house. My conservatory.

Not only do I more often than not leave the door open during the day, but my cats are also fed in there, so it's a popular place for insects to set up shop. What better spot to try this latest hack?

picture of sliced cucumbers on windowsill near back door

My plate of cucumbers to put this hack to the test

(Image credit: Emily Smith / Future)

Unlike my favourite expert spring cleaning tips, this hack did not work particularly well for me. There were still flies coming in and out of the house, and it didn't appear to deter them from staying a while.

At first, I wasn't sure if the amount of cucumber was the issue, but I refused to sacrifice any more of my food shop to find out. Watching the first batch sit there festering was painful enough; doing it how many more times just seemed ridiculous.

aerial view of sliced cucumber on plate

(Image credit: Emily Smith / Future)

Although it wasn't successful for me, I wanted to speak to a qualified expert and see if there was any truth behind the method.

"There are several well-known natural fly repellants that can be used around the home, such as basil, eucalyptus, citronella, lavender and peppermint oils. Cucumber could also be another natural deterrent, due to its unique, strong smell," explains Daniel Baldwin, Board Certified Entomologist at Hawx Pest Control.

"Whilst these can act as a deterrent, natural remedies often don’t work effectively enough to completely eradicate the issue with flies. Natural deterrents tend to work for a short period and need regular top-ups or replenishment for them to continue to work effectively," he adds.

Not only that, but Daniel also echoes my issue. He says that if you do decide to try this, then you'll need to replace the cucumber regularly, as they'll start to rot, and that will attract even more pests.

Daniel Baldwin
Daniel Baldwin

Daniel is the Vice President of Technical & Training Services at Hawx Pest Control. He is a board-certified entomologist and licensed pest control operator with over 25 years of experience in the pest control industry.

picture of house fly sitting on blind in house

(Image credit: Getty Images)

To avoid dealing with little black flies in your home on top of the house flies, Daniel recommends some other effective methods like keeping your home clean, using sticky traps, cleaning your drains regularly and using stronger natural deterrents like mint, lavender and peppermint.

I don't know about you, but I'll happily stick to my citronella scented candles and essential oils. No more cucumbers will be sacrificed in the name of fly prevention.

Shop alternative fly deterrents


Knowing how to get rid of fruit flies and other small, annoying pests around your home can save you a lot of stress in the long run. Should your fly problem get too overwhelming, then Daniel recommends calling in professionals, as there might be a deeper issue causing the infestation.

Emily Smith
Digital lifestyle writer

Emily joined woman&home as a staff writer after finishing her MA in Magazine Journalism from City University in 2023. After writing various health and news content, she now specialises in lifestyle, covering unique cleaning hacks, gardening how-tos, and everything to help your houseplants thrive.