5 All-Natural Ways to Keep Flies Away From Your Home

Closeup of a fly in the home

The Spruce / Meg MacDonald

Project Overview
  • Working Time: 15 mins - 1 day
  • Total Time: 15 mins - 1 day
  • Skill Level: Intermediate
  • Estimated Cost: $0-300+

Do you ever feel like no matter what you do, there always seem to be a few pesky flies buzzing around your house? Whether these bugs are fruit flies, houseflies, or something else, their presence can make an otherwise comfortable home feel suddenly uncomfortable. Fortunately, there are things that homeowners and DIYers alike can do to reduce the number of flies they see in and around their dwellings.

This guide will discuss the steps necessary for getting rid of these unwanted guests once and for all. Read on to learn more about where the flies in your house might be coming from and how to keep them away.

Before You Begin

As nice as it would be to have some sort of magical DIY fly repellent spray, there are some things to consider when trying to spray for flies:

  1. Chemical treatments for flies are not typically necessary. Flies are generally considered a "source" pest—this means there is a source nearby that is providing the flies with something they need. In other words, something is attracting them. Once this source is addressed, the fly issue often resolves.

  2. Most DIY pest control solutions advise the use of essential oils. There are certain essential oil treatments that work for specific pests, but overall, they don't do much for the long-term control of pests.

  3. Considering flies hang out in some of the nastiest areas, fly repellents don't do much to keep flies away. Flies don't give a hoot about fly repellents, they're just hoping to find somewhere nasty (and preferably stinky) to spend their time.

In this guide, we will cover a number of all-natural control methods for various fly species inside and outside the home, with some general fly prevention tips sprinkled throughout. Some of these steps will require purchasing special equipment and others won't, so pick and choose what works best for you and your fly situation.


Identification is crucial when it comes to ongoing fly control, but it's okay if you don't know what type of fly you're dealing with yet. Just understand that it should be your primary goal to figure it out, because different flies hang around for different reasons.

What You'll Need

Equipment / Tools

  • Fans (standing or box)
  • Stiff drain brush
  • Drain cleaner


  • Enclosed compost bin
  • Air Curtain fan(s)
  • UV light trap(s)
  • Fly paper (homemade or storebought)
  • Vinegar-based fruit fly trap


Materials to keep away flies in the home

The Spruce / Meg MacDonald

How to Keep Flies Away from Your Home

  1. Close Doors, Windows and Screens

    Keeping the doors and windows shut is one of the most simple yet effective ways to keep flies out of your house. This will ensure that any pesky flies lurking outside don't manage to get into your space.

    Additionally, installing screens on every openable window can make a huge difference in the number of flies you see inside your home. Screens guard against intrusion and add an extra layer of protection, acting as an additional barrier against flying bugs.

    As you can tell, closing the doors and windows and having properly fitted screens are two essential steps to keeping flies at bay inside your home. If your screens are damaged, it's probably a good idea to repair or replace them.


    When trying to identify flies, start by looking around your windows. Oftentimes, when flies are trapped inside, they will fly toward the window hoping to make their way back outside where they belong. While they often don't make their way back out, they will die trying, leaving intact fly samples along the windowsills. It may seem gross, but these samples will be very helpful for identifying the flies.

    Keeping screens and windows closed to deter flies in the home

    The Spruce / Meg MacDonald

  2. Remove Rotting Organic Material

    Flies like bottle flies like stinky, smelly, nasty things. Things like spoiled food waste, rotting yard debris, and, of course, dog poop.

    If you're noticing lots of flies around your home, inside or outside, it will be important to address any sources of rotting materials so they will be less attracted to your property. Flies are known to travel 1-2 miles in search of stinky meals. Don't let your house become a pit stop.

    Inside, aim to address areas like:

    • Compost bins on the counter: Make sure it seals well so the smell can't get out, and take it out frequently
    • Garbage and recycle storage: Keep them clean and empty them regularly, or they will smell, and flies will come looking for a meal
    • Dirty diaper storage: Like all stinky trash, dirty diaper storage cans should be emptied on a regular basis

    If there are outside sources attracting flies to your property, it's only a matter of time before they make their way inside. Outside, you can:

    • Pick up dog poop: This goes without saying, but certain flies like poop and will hang around in large numbers if there's ample poop in your yard
    • Move your outside trash bins: Ideally, keep your trash and recycle bins away from the house to avoid drawing flies in
    • Enclose your compost: Consider purchasing or building an enclosed compost space that makes fly access more difficult, and if that's not possible, try to keep it as far away from the home as possible
    Removing rotting food from the house to avoid flies

    The Spruce / Meg MacDonald

  3. Keep the Air Moving

    Believe it or not, you probably have one (or more) of the most effective fly-repellent tools available, and you don't even know it.

    Place fans throughout your home, especially in areas where you see flies hanging out. This will keep the air in your house moving, making it difficult for flies to do what they do best: fly! Not only is this method cost-effective, but it also requires little effort to maintain. With the proper positioning and settings, you have an all-natural solution for keeping flies away.

    There are specialty fans called "air curtains" that can be installed above doorways and blow over the door to prevent flies and other pests from entering as people come and go. These fans are handy but expensive.


    You can place a fan at the entrance of your home, pointing outward. This will discourage flies from entering the same way an air curtain does.

    Placing fans throughout the home to deter flies

    The Spruce / Meg MacDonald

  4. Use Fly Traps

    If you are finding yourself in the unfortunate situation of dealing with a fly infestation, there are a wide variety of fly traps, including:

    • UV lights: There are UV lights available for both indoor and outdoor use. While effective, these traps are designed to draw flies in before zapping them, so don't place them in areas where you don't want to see flies.
    • Flypaper: Homemade or store-bought fly paper can be hung in more localized areas, either indoors or outdoors, to deal with larger flies. Focus on hanging your flypaper in areas where the air is stagnant. Flies like to hang out in the still air, so flypaper can be a great tool for reducing their population size.
    • Vinegar traps: These traps work for fruit flies, where the smell of the vinegar draws them in and the device traps them inside. Just make sure you're dealing with fruit flies and not drain flies.
    Placing UV fly traps in areas of the home

    The Spruce / Meg MacDonald

  5. Clean Your Drains and Garbage Disposal

    Many flies could be attracted to the smell coming from your drains or garbage disposal, but the most interested party is the drain fly.

    Keeping your drains and garbage disposal clean is a necessity if you want to avoid the nuisance of drain flies. These pesky little insects that look like teensy, heart-shaped moths are known to invade the areas near kitchen sinks and bathroom drains.

    To prevent an infestation of drain flies, it's important to clean any areas of your home that house drainage systems. Remove debris from your drains and disposal by thoroughly scrubbing with a stiff brush and drain cleaner.

    Cleaning out drains and garbage disposals to avoid house flies

    The Spruce / Meg MacDonald

When to Call a Professional

Generally speaking, flies are a source pest, meaning once the source of the issue has been resolved, the issue should go away on its own.

That being said, fly problems can be perplexing, especially if you're having trouble identifying the source of the issue. Don't be afraid to call a pest professional if you're stumped. They'll be able to help you identify the fly in question, as well as point out potential fly sources that need to be addressed.

The Spruce uses only high-quality sources, including peer-reviewed studies, to support the facts within our articles. Read our editorial process to learn more about how we fact-check and keep our content accurate, reliable, and trustworthy.
  1. “Flies in the Home.” CSU Extension

  2. How Far Can a House Flies Fly? Entomology at the University of Kentucky.