How to Get Rid of Flies from Your Backyard

How to Get Rid of Flies from Your Backyard
August 09, 2021

There are thousands of kinds of flies and even more insects classed under the order Diptera. These insects are in the same order since they have one set of wings, and they are by-and-large "nuisance" flies. Houseflies are among the most common types of flies that aren't afraid of showing up in hordes around human development.

Houseflies aren't necessarily dangerous, but they are an irritating pest, especially if you try to hang out in your backyard only to be mobbed by these winged insects. They lay their eggs in all kinds of garbage, rotting material, or animal feces. An infestation of the pests limits the amount of time you can spend time enjoying your outdoor space. If you are ready to get rid of the flies interrupting your outdoor time with your family, you have come to the right place.

Why Are There So Many Flies in My Backyard?

First, let's take a look at why you might have an infestation of houseflies. These aren't extremely logical creatures, so there isn't always an obvious reason. However, getting rid of them might be as simple as figuring out why they are there and taking away that geographic incentive.

For example, houseflies will be attracted to areas in which they can sense rotting material or feces. Do you have a dog that regularly eliminates in the backyard? How often do you clean up after them? If your backyard is littered with feces that you haven't had time to grab yet, the presence of all these flies is telling you that now is the time.

Another common item that attracts houseflies is open or overstuffed garbage cans. Are your garbage cans placed in a part of your backyard where it is easy for the flies to get into the rest of your backyard space? Consider moving your trash cans so that they are further away from where you enjoy sitting. That is especially true if you enjoy eating outside since the flies will happily move from the trash to swarm around your new, great-smelling food.

How to Get Rid of Flies with Anti-Fly Planting: MarigoldsHow to Get Rid of Flies with Anti-Fly Planting: Marigolds

How to Get Rid of Flies

If cleaning up your backyard space or moving around your trash isn't your easy solution, then we have plenty of other ways you can cleanly and safely get rid of flies in your outdoor space.

Anti-Fly Planting

If you are already enjoying decorating your backyard with plants and landscaping, then you can easily incorporate herbs and flowers that flies don't like being around. Some of the plants that repel flies include:

  • Catnip
  • Lavender
  • Basil
  • Rosemary
  • Marigolds
  • Bay leaves

Essentially, these herbs and flowers have a strong aroma that typically repels flies, especially those with a spicier scent like basil or catnip. And, as a bonus, all of these plants are great for use in the kitchen.

Natural Fly Mixtures

Planting those herbs and flowers is a great long-term solution, but if you currently suffer from a large housefly issue, you might want a more immediate solution. The following two mixes use natural ingredients and are convenient fast-acting solutions.

  • Vinegar and Dish Soap Mix: White and apple cider vinegar are the stars of the show when cleaning up almost any problem or stain, and that just so happens to include a housefly infestation as well. Make a mixture of apple cider vinegar with a couple of drops of dish soap and add it into a tall glass. Trap the flies in the vinegar by covering the glass with plastic wrap, securing it with a rubber band, and poking several small holes into the top. When the flies crawl into the glass and try to land on the vinegar, the dish soap will cause them to sink to the bottom, and the plastic wrap will keep them from easily being able to fly out of the small space again.
  • Cayenne Pepper Mix: Another easy solution you can use to repel flies instead of trapping them is a mixture of cayenne pepper and water. The spicy scent and burning sensation cayenne causes make it an excellent housefly repellant. Mix cayenne with water and spray it around the outdoor space to deter them from flying around and landing anywhere near you.

Trap Bait

Have you tried the vinegar and dish soap mixture but attracting the flies to the glass seems to be a hangup? There are plenty of ways to attract flies to your traps. You can try to smear the inside of the glass or plastic wrap with honey or another kind of sugar mixture. You can also use something sugary and sweet, like wine or sliced fruit, so it is easy for them to smell. Although you might not want to leave it out in your backyard area for too long, you can also use meat to attract flies to your trap.

Sticky Traps

Sticky traps are an easy solution to get rid of some of the flies you might have to hang around your backyard. They smell slightly sweet but not noticeably so to humans. You can hang these up under your porch awning, or somewhere the flies seem to flock to, and they will stick to the hanging tape. The downside of these is that they are very visually obvious unless you place them well.

A screened gazebo can help you get rid of fliesA screened gazebo can help you get rid of flies

Use a Gazebo to Keep Flies Away

Houseflies live everywhere that humans do since our trash production is part of what helps them survive. Their survival instinct tells them to stick around us. The unfortunate aspect of this is that we can never get rid of all of them for long durations of time. 

Instead of constantly trying to shoe them away, keep yourself, your guests, and your food protected under a backyard structure. Not only will this separate you from those pesky flies, but a quality outdoor structure can also increase the value and aesthetic of your backyard.

The following structures are best if you are trying to enjoy time outside but want to stay protected from the housefly nuisance.


Not interested in being surrounded by walls when you want to enjoy the Great Outdoors? We understand, which is why we also include gazebos on our list. There are two primary kinds of gazebos you can use to stay outside but keep the flies away. 

A gazebo works well because they typically have a solid roof made from either fabric or panels but open sides. These sides often come with curtains or mosquito netting that can be fixed to each of the legs when you don't want to use it. Since houseflies are only predominant during hot summer weather when there isn't much of a breeze, there are quite a few seasons when you might not have an issue sitting outside under cover of your gazebo without the netting.

Attached gazebos are installed over a patio or deck and affixed on the side of your home. Freestanding gazebos are another option if you have a large backyard and want a focal feature in one corner or perhaps set next to a pool area. A freestanding gazebo functions in the same way that an attached gazebo does, but with all sides open. You can still close them off using mosquito netting or heavier curtains, depending on what you what.

If you want to enjoy as much of the breeze and sun as possible, you might also want to consider a pergola. A pergola has boards or panels running across the top, but it is still partially open. Although it still allows the flies to come in through the top, you can also plant vines over it to block off some of their access and use mosquito netting around the open sides.


Solariums are an excellent choice if getting as much time in the sun as you can is one of your backyard goals. These sunroom structures are great at keeping out those irritating flies. Oftentimes, solariums come equipped with walls and door panels that run all the way around the outside perimeter. That way, you can enjoy the sun and the feeling of being outside without spending most of your time shoeing away the flies swarming your food or drinks.

How to Get Rid of Flies Outside and Enjoy Your Backyard

Keeping flies away using traps, bait, or plants will never succeed 100% of the time, but, with an outdoor structure, you can protect yourself from those that do fly your way. 

Are you having trouble figuring out the perfect solution for your fly problem? Talk to the outdoor structure experts at ShelterLogic to get help in choosing the ideal solution for your outdoor pest issues that'll also enhance your backyard style.

Comments Form