How to Get Rid of Flies Indoors & Outdoors

Say Goodbye to Flies With These Simple Methods

The Spruce / Michela Buttignol

House flies and cluster flies are common home invaders inside and outside your home. If you leave your windows and doors open or don't have a complete seal on your screen, flies will follow scents that lead them inside to food sources and nesting spots. Flies will also swarm outside your home, especially if you have a compost pile, garbage cans, and a yard with pets, or live in a rural, farm-like environment.

Here are several effective and natural ways to get rid of house flies outside and inside your home.

What Causes Flies?

Why do you have so many flies in your house all of a sudden? Flies are creatures of opportunity with a great sense of smell. A warm place with rotting, decomposing food, ripe fruits (fruit flies), pet feces, or used diapers are the literal breeding grounds for flies.

To get rid of flies in your home fast, find the fly nest in your house and eliminate the source attracting the flies.


Inside your home, there are several areas where flies would love to inhabit: garbage cans, sink garbage disposal drain, or ripening fruit on your counter. Keep windows closed, ensure screens are secured with no cracks or rips, and don't leave the door open longer than necessary.


Garbage cans, compost piles, animal feces, and outdoor lights are irresistible to flies. Homesteaders, backyard farms, or rural home environments are more prone to outdoor home infestations, with more sources for flies to flock to.

Secure garbage can covers and pick up animal wastes. If a compost pile is giving you a fly problem, consider a closed compost bin to reduce flies from assembling, or put your pile or garbage cans near plants like mint, basil, and lavender that make smells that will keep flies away or get rid of flies naturally. Also, turn off outdoor lights or put them on a motion sensor when not in use.

  • 01 of 07

    Eliminate Food Sources

    dishes in the sink

    The Spruce / Ulyana Verbytska  

    Try to see your house the way a fly sees it. Dirty dishes in the sink, unlidded trash cans and compost bins, and half-empty pet food bowls are all inviting sources of food for flies. Go through your house room by room, and do what you need to do to shut down the buffet. And don't just do it once in a while. To keep your home fly-free, get into the habit of doing a weekly (or biweekly) fly check, perhaps on trash collection day.

  • 02 of 07

    Figure Out How They're Getting In

    cracked window

    The Spruce / Ulyana Verbytska  

    It's normal for some flies to get in with the opening and closing of doors. However, if you have a lot of flies in your home, you need to figure out how they're getting in. Examine your window screens for tears, and patch or replace any that are damaged. Then, take a look at the caulking around all windows and doors. If you haven't re-caulked in a while, then that might be the culprit. Finally, inspect the weather stripping around your doors, and make the necessary adjustments or replacements to ensure your home is fly-proof.


    7 Tips for Controlling Cluster Flies

  • 03 of 07

    Make a Fly Trap

    homemade fly trap

    The Spruce / Ulyana Verbytska  

    A fly trap can lure flies away from your patio and deck when you want to eat al fresco during the warmer months. This crafty project will keep flies away from your outdoor meals using an everyday household product, an empty plastic bottle, with bait such as ripe fruit. It also can be helpful to hang the trap away from doors that open frequently to draw flies away from the opening into your house. Using this method, you get rid of flies naturally without the use of chemical insecticides.

  • 04 of 07

    Make Fly Paper

    fly paper

    The Spruce / Ulyana Verbytska  

    Flypaper will never win a design competition, but it sure does the trick to trap and kill flies. Pick up some fly paper at the store, order it online, or make your own fly paper at home. Then, simply hang it up, and watch the flies flock to it.

    Continue to 5 of 7 below.
  • 05 of 07

    Make Fly Repellent Spray

    fly repellent spray

    The Spruce / Ulyana Verbytska

    Stock up on essential oils that flies don't like (including lavender, eucalyptus, peppermint, lemongrass, and basil), and use them to make your own fly repellent spray. To mix, just fill a spray bottle with water, and add enough essential oil to fragrance. Then, spray it in your kitchen and around your doorways to keep the flies out. Of course, you'll need to respray regularly to maintain the effect. This method also avoids using chemical pesticides, employing a solution that gets rid of flies naturally or organically.

    Be sure to label your fly repellent spray, so others know what it is. And store it out of the reach of children and pets.

  • 06 of 07

    Use Plants to Keep Flies Away

    mint growing in a kitchen

    The Spruce / Ulyana Verbytska

    If you want to go the natural route, getting rid of flies without killing them, some traditional remedies claim that flies have an adverse reaction to the smells from such herbs as lavender, mint, lemongrass, and basil. You can use the herbs as foundation plantings around your house, or stick them in flower pots positioned by your exterior doors.

  • 07 of 07

    Clean Up After Your Pets

    cat's food dish

    The Spruce / Ulyana Verbytska  

    If you need a reason to stay on top of your pet-related chores, then here it is: Flies lay 75 to 150 eggs at a time, and they prefer to lay those eggs on poop. Because the fly eggs will hatch within eight to 20 hours, for every dog pile that you leave in your backyard today, you will be looking at 150 more flies tomorrow. It's important to scoop up after your pets on a daily basis, and be sure to keep their cages clean as well.

  • What natural methods can you use to get rid of flies?

    If you choose to avoid chemical pesticides, you can make a deterrent spray of cayenne mixed with water. You can also make a trap solution of apple cider vinegar and dish soap. The vinegar attracts the flies; the soap makes them unable to fly away, drowning them.

  • What smells attract flies the most?

    Common house flies are primarily attracted to decaying organic matter, such as feces and rotting meat. Fruit flies are most attracted to sugary substances, including overripe fruit, spilled soda, and alcohol.

  • Are flies active day and night?

    Flies are primarily diurnal, preferring to do all their activities during the day. At night, flies take residence under leaves and on tree trunks; sunlight perks up fly activity.

Article Sources
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. Plant Essential Oils and Potassium Metabisulfite as Repellents for Drosophila Suzukii (Diptera: Drosophilidae). Scientific Reports Vol. 6, No. 1.

  2. Featured Creatures: House Fly. University of Florida, Entomology & Nematology.