Cleaning & Organizing Pest Control Spider & Insect Control

How to Get Rid of Flies Indoors/Outdoors

Keep annoying flies away with these effective tricks.

House flies and cluster flies are common occurrences 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.

The Spruce / Michela Buttignol

Here are several effective ways to get rid of house flies indoors and outdoors.

What Causes Flies?

If you wonder why you have so many flies in your house all of a sudden, bear in mind that flies are creatures of opportunity with a great sense of smell. To get rid of flies in your home, identify what attracts them and eliminate the source.

Inside your home, there are several areas that flies love to inhabit: garbage cans, sink garbage disposal drain, or ripening fruit on your counter. A warm environment with rotting, decomposing food, pet feces, or used diapers are literal breeding grounds for flies. Outdoors, 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.

How to Get Rid of Flies Indoors

Make Your Home Fly-Proof

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.

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. Throw out overripe produce (which also attracts fruit flies), wash dirty dishes, store leftovers in sealed containers, and clean your drains and garbage disposal. And don't just do this thorough cleanup 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.

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. It's important to keep the cat litter box, hamster cages, aquariums, terrariums, and any other pet dwellings clean.

Use a Fly Trap

homemade fly trap

The Spruce / Ulyana Verbytska

When you buy a fly trap, make sure it is suitable for indoor use, as some products contain pesticides. With homemade fly traps, you can get rid of flies naturally without the use of chemical insecticides.

A common homemade fly trap is an empty plastic bottle filled with bait such as ripe fruit. It also can be helpful to hang the trap from doors that open frequently to draw flies away from the opening into your house.

Another popular homemade fly trap is to mix about a few inches of apple cider vinegar, a tablespoon of sugar, and a few drops of dish soap in a shallow bowl. Cover the bowl with plastic wrap and secure it with a rubber band, Using a toothpick, poke small holes in the top. The vinegar attracts the flies; the soap makes them unable to fly away, drowning them.

Make Fly Paper

fly paper

The Spruce / Ulyana Verbytska

Fly paper 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.

Make Fly Repellent Using Essential Oils

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.

How to Get Rid of Flies Outdoors

Clean up After Your Pets

Cleaning up after your dog in your yard

Kerkez / Getty Images

Scooping up after your pets outdoors just as regularly (i.e. daily) and meticulously as indoors is crucial to keep flies populations down in your yard. For every dog pile on which a fly lays an egg, you are looking at 150 more flies tomorrow.

Use Plants as Fly Repellants

Lavender in pots by door to repel flies

Rosmarie Wirz / Getty Images

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 plant them in pots and position them by your exterior doors. Or, you can plant Venus flytrap, a carnivorous plant that eats insects.

Use Outdoor Fly Traps

Commercial outdoor flytraps are either disposable and or permanent so you have to refill them with the bait and clean them when they are full. Because outdoor fly traps often have a strong odor and contain pesticides, they have to be placed at a minimum distance from human activity. Always check the product label for details.

Light a Citronella Candle

Citronella candle

robypangy / Getty Images

This is a classic backyard repellant not only against flies but also other flying and stinging insects. Both the smell of the candle and the flames and smoke act as repellants.

Use an Outdoor Fan

Outdoor fan

Tisomboon / Getty Images

There are different types of fans you can use to keep flies away. The stronger the blast of air, the more difficult it is for the flies to fly. A ceiling fan is ideal because it creates a downward draft but you can also use a freestanding or a box fan and place it strategically so it blows air in the sitting area. For maximum effect, it is recommended to use at least a couple of fans pointing in different directions. For small spaces, a portable table fly fan might do the job.

Reconsider Your Compost Pile

Compost bin with lid

Alphotographic / Getty Images

If your compost pile is close to your house and attracts a lot of flies, it can lead to a fly infestation indoors. Consider moving it farther from the house or switching to a closed compost bin, which also keeps rodents out.

How to Prevent Flies

Preventing flies is pretty much identical to getting rid of them: removing the sources that attract them, both indoors and outdoors.

After you have eliminated all the sources that attract flies, you might not see immediate results. Houseflies live 15 to 30 days and indoors where it’s warm and cozy and there are no predators, houseflies can live even longer. But once you have eliminated their breeding grounds, you should see a decline if not disappearance of house flies within a couple of weeks.

FAQ
  • Should I leave the door open to get rid of flies?

    Never leave the door open longer than necessary; flies won’t leave your home through the door. If there is anything in your home that attracts flies, chances are that you will draw in even more flies.

  • 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.

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. Featured Creatures: House Fly. University of Florida, Entomology & Nematology.

  2. Plant Essential Oils and Potassium Metabisulfite as Repellents for Drosophila Suzukii (Diptera: Drosophilidae). Scientific Reports Vol. 6, No. 1.