Skip to Main Content

How to Keep Flies Away From Your Yard (and Out of Your House)

Well, it's impossible to completely eliminate flies—but here's how you can reduce their presence.
How to Keep Flies Away From Your Yard (and Out of Your House)
Credit: Nikul6533 - Shutterstock

It’s summer, and that means one thing: wretched goddamn flies getting all up in my yard, ruining my barbecues. How can I keep them away this year, once and for all? How can I—and you—drive flies, gnats, and other flying pests back from whence they came so they stop bothering us in our yards? The short answer is: You can’t. Unless you encase your property in mosquito netting, insects will come into your yard. They’re small, they can fly, and you are not the boss of them.

You can, however, reduce the number of flies that come around, and prevent infestations and breeding.

How to reduce the number of flies in your yard

The key to lessening the number of pests flying around your yard is to ask yourself what the flies are doing in your yard to begin with. What are they looking for? What do they want? Spoiler: They mainly want filth.

Houseflies, fruit flies, flesh flies, and fungus gnats(!) are only some of the common kinds of “filth flies” that bedevil us. They are, generally speaking, looking for feces, garbage, dead animals (including hamburgers), spilled juice, decomposing plant matter, and other biological detritus. True to their name, they’re drawn to filth. They want to lay eggs in filth and eat filth. So if you want fewer flies, you need to start by being less filthy.

Tips to stop attracting flies

The tips below will prevent infestations of filth flies of various kinds, so you should start with a thorough outdoor inspection and follow this advice:

  • Don’t leave animal waste on the lawn. There’s a reason “…like flies to shit” is a common saying.

  • Make sure your garbage can lids are sealed and the cans are clean.

  • Keep compost at a distance.

  • Inspect your property for any standing water, and get rid of it.

  • Mow your lawn regularly.

How to rid flies from a clean yard

So you cleaned your garbage cans and hauled away the rotting horse carcass on your lawn. Awesome! But the Flies. Still. Come. Yeah, they’ll do that. Maybe they’re reproducing on your gross neighbor Gary’s compost heap, and are drawn by the scent of the burgers you’re cooking or the pitcher of Mai Tais you spilled. Here are some suggestions—but again, these are only likely to reduce fly problems, not eliminate them.

  • Use fans: Flies don’t like windy conditions, so an electric fan or two strategically pointed at the picnic table or barbecue grill can cut down on the number of flies. Plus, it will blow the scent of your food away from said food. Your can use any kind of fan—oscillating, box, platform, it’s all good.

  • Flypaper: Strips of flypaper work well for eliminating (some of) the flying pests that bedevil your yard or home. You can make your own (but is your time worth nothing?) or you can buy them. Either way: The sweet smell attracts pests to the strip, where they get stuck on the gluey surface until they starve. (As an added bonus, I have to believe the bastards suffer.) Hang flypaper somewhere where there is little air movement (flies don’t like that). The rule of thumb, according to Texas A&M University, is “one 10-inch strip per 1,000 cubic feet of space. Install the fly strips within 6 feet of the floor because most fly activity is near the ground.”

  • Use fly bait: Fly bait products like QuickBayt, Golden Malrin, and MaxForce attract flies with something sweet and poison them with something nasty, usually methomyl. They’re effective and easy to use, but methomyl is not good for animals or human consumption, so use extreme caution.

  • Make a game of fly-killing: Maybe you need to change your mindset? Watching flies die can be a fun activity on a lazy summer day; just ask Homer Simpson from The Day of the Locust. I suggest a Zap-It fly racquet if you’re going for a high kill-count, or a Bug-A-Salt rifle if you’re more into sport—it’s totally inefficient, but shooting flies with blasts of salt is so satisfying.

Keeping flies out of your house

Assuming you don’t have piles of rotting garbage on your living room floor, you probably don’t have filth flies breeding in your home, so the trick to keeping flies out of your house is to keep flies out of your house. Make sure your window screens are in good repair. Don’t leave the doors open. Check for places they can get in, like cracks in the attic or basement.

If a fly (or two or 15) does get in your house, the best solution is an old-fashioned flyswatter (at least, according to the New York Times).

Things that DO NOT keep flies away from your yard

I’m astounded, aghast, and even agog at the volume of fly-related misinformation on the internet. It is as if houseflies have a network of secret troll farms in the Philippines pumping out disinformation designed so that you don’t kill them. (I wouldn’t put it past them, frankly.) Here are a few dubious but widely believed fly-repelling techniques.

  • Citronella candles: While insects, particularly mosquitos, are repelled by citronella, it’s a question of scale. Any chemical a candle releases is quickly be dispersed by the air around it. Bottom line: They don’t work. 

  • A plastic bag filled with water: According to many people on the internet, hanging a plastic bag filled with water (or water and pennies) on your porch will keep flies away without chemicals. (I mean, water is a chemical, but whatever.) The idea is that the water refracts lights, confusing the delicate eyes of flies, and the pennies are shiny so the light— you know what, don’t even worry about it. It’s stupid and it doesn’t work.

  • Essential oils: Add “repelling flies” to the long list of things essential oils don’t do.

  • Plants that repel flies: I don’t know for sure whether planting basil, mint, rosemary, or any of a dozen other plants would repel flies to any significant degree, but I do know that mosquito-repelling plants are a lie.

  • Sonic repellents: There are a variety of sound-wave-related solutions for flies and other pests and vermin on the market, but they do not work.

  • Vinegar: Some people recommend using vinegar to keep flies away. I can’t say whether this would work on houseflies or not, but fruit flies are called vinegar flies because they love the stuff so much. So even if it kept one kind of fly away, it could draw another.

  • Irish Spring soap: According to this Facebook post, hanging a bar of Irish Spring soap will keep flies away. Even if this soap did have a smell that repels flies as stated (and I’m certain it does not), do you know how many bars you would have to hang up to create a fly-blocking miasma around your yard? Use your head, people.

  • Bug zappers: Bug zappers actually work too well. These ultraviolet lights attract and kill flying insects by the thousands, but they’re the wrong kind of insects. Instead of mosquitos and flies, they mostly kill helpful pollinators like moths, and even parasitic wasps that kill pesky filth flies. They make mosquito problems worse!

  • Yellow light bulbs: These don’t repel bugs, but may attract fewer bugs than white lights.

  • Growing a Venus flytrap: Venus flytraps do not eat flies very often—like maybe a fly per month—so growing one in your garden would only work if you are being bothered by one or two specific flies.