How to Get Rid of Houseflies Once and for All

Bye bye, fly

Happy family walking out the front door together
Photo: fizkes / Adobe Stock
Happy family walking out the front door together
Photo: fizkes / Adobe Stock
Get quotes from up to 3 pros!
Enter a zip below and get matched to top-rated pros near you.
Geo Icon

Are houseflies driving you crazy? Take back your space by eliminating this pest problem using one or more of these removal methods and learn some preventative actions so you can banish them for good.

Are Houseflies Harmful?

While they are a nuisance, flies are usually not dangerous as they rarely bite or sting. However, houseflies can transmit diseases and spread bacteria because they lay their eggs on unsanitary surfaces like decaying food and trash or dead animals. 

What’s Attracting Houseflies to My House?

​​While a fly or two inside your home is to be expected (especially during summer months), if you see a swarm of them, it’s time to address the problem. Houseflies normally don’t originate from inside your home, which means they likely found their way in through exterior doors and windows, seeking a warm environment. 

Once flies come in from the outside, they are attracted to various sources in your home:

  • Rotten fruit

  • Garbage

  • Food leftovers

  • Trash

  • Pet waste

  • Cat litter

  • Animal food

  • Other flies

The average life cycle of a housefly is around 15 to 30 days but within that time, they can lay their eggs on various breeding sites and continue to infiltrate your space. You can distinguish houseflies from other types of flies such as fruit flies or drain flies by their larger appearance.

How to Get Rid of Houseflies

A simple fly swatter may do the trick when you have random houseflies from time to time, but when they are persistent, you may need a more aggressive method.

1. Address Outside Sources

Because houseflies originate from outside the home, start by checking the exterior to see if they are coming from there. For example, you may find them swarming around a pile of mulch because it is composed mainly of organic material. Pay close attention to areas that may accumulate standing water, as flies are attracted to damp areas and stagnant water. Clearing up the source of the exterior flies may ease the issue inside your home. 

2. Perform a Deep Clean

Man cleaning messy kitchen
Photo: deagreez / Adobe Stock

If you can’t pinpoint an exterior source where the houseflies may come from, try cleaning the inside of your home from top to bottom, starting with bathrooms and the kitchen. Take out all the garbage and target any areas and crevices where there may be food sources. 

3. Use Natural Houseplants

Using houseplants or herbs to combat flies not only makes your house smell nice, but can keep these pests at bay. Here are some plants you can use to repel pesky houseflies:

  • Lavender

  • Basil

  • Cloves

  • Pine

  • Mint

  • Marigolds

  • Venus Fly Trap (although they can only consume 5–10 bugs each month)

4. Make a Cayenne-Based Spray

Because of its heat, cayenne pepper can be used as a deterrent around your home. Mix a teaspoon of cayenne pepper with one cup of water and put it in a spray bottle. Spray the mixture on the edges of doors and windows or where the flies are congregating.

5. Mix Apple Cider Vinegar and Dish Soap

Another effective way to get rid of houseflies is to use apple cider vinegar as a deterrent. Mix two tablespoons of apple cider vinegar, ½ cups of water, and a few drops of dish soap in a small bowl. Cover the bowl with plastic wrap, and poke holes in the top. They will be attracted to the sweet smell of the apple cider vinegar, go into the trap through the holes, then be unable to get back out.

6. Hang Sticky Traps

Another pest control method is hanging sticky traps inside and outside of your home. Put them near entryways, sinks, garbage disposals, and garbage cans. This is a good first line of defense because they last for a few weeks without releasing any harmful chemicals into your home.

7. Apply Insecticides

For more stubborn fly infestations, you may need to take stronger measures. Chemical-based insecticides can eliminate houseflies and prevent them from breeding any further. You can use sugar-based fly bait that attracts them to the source, causing them to ingest the chemical. Or, you can try a pyrethrin-based insecticide spray inside and outside of your home to instantly eliminate the houseflies when they come in contact with the chemical.

Note: As with any chemical cleaner, it’s important to properly ventilate the room when using and refer to the manufacturer’s directions regarding cleanup and application, especially around children and pets.

8. Make a Soda Bottle Trap

Use an empty soda bottle to create a homemade fly trap that they’re attracted to but can’t get out of.

  • Take a one-liter soda bottle and carefully cut along the top indented line with a serrated knife or sharp scissors. 

  • Put some ripe fruits or honey at the bottom.

  • Add water and a few drops of vinegar to the empty bottle so that it is covering the fruit.

  • Flip the cut-off piece upside down and place it inside the empty bottle with the funnel facing down.

Once you have assembled the trap, the flies will be attracted to the sweet ripe fruit or honey, but fall into the water and vinegar mixture. They won’t be able to get back out, preventing them from laying their eggs on new breeding sites.

9. Try a UV Light

Trap flies using ultraviolet light to eliminate infestations. Like most insects, flies are attracted to light sources, which is why you may notice yourself shooing them away more often on summer nights when you're near a porch or flood. 

They work by emitting a strong UV light that lures the flies to the source and then they get stuck to an attached glue trap. Some UV light traps have an electric component built in that zaps the flies as they gravitate towards the light.

How to Prevent Houseflies

A woman composting food waste in her garden
Photo: Peter / Adobe Stock

Stop houseflies in their tracks by taking preventative measures inside and outside of your home by adopting these habits:

  • Keep compost piles far away from your home

  • Regularly clean out the refrigerator

  • Be sure to cover all trash cans, even outdoor bins

  • Take out the trash often

  • Don’t leave out exposed meats 

  • Immediately clean up spills (especially during the summer)

  • Make sure seals are tight on doors and windows

  • Check screens for small rips and tears that flies can get in through

  • Replace mulch once it becomes discolored and you see signs of decomposition

  • Don’t leave grass clippings lying around

  • Clean cat litter daily

  • Remove sources of standing water

FAQs

What keeps the houseflies away?

To prevent houseflies from showing up in the first place, there are some small steps you can take. Keep your kitchen clean by removing any compost, trash, and old food. Clean up any spills quickly and make sure your windows don’t have any rips that will let them come inside. 

What are natural ways to get rid of houseflies?

There are many natural ways to get rid of houseflies, including

  • Planting deterrants like lavender, basil, clover, mint, venus fly traps, marigold, and pine.

  • Mixing cayenne with water to create a natural spray. 

  • Mixing apple cider vinegar with soap to create a seductive trap.

Need professional help with your project?
Get quotes from top-rated pros.
The homeowners guide to pest control services
From average costs to expert advice, get all the answers you need to get your job done.
 An armadillo walking through grass
Aug 15, 2024
Aug 15, 2024
Find out how much it costs to remove armadillos and stop them from coming back. Know how much to budget to humanely remove these pesky critters from your yard.
An exterminator sprays a yard
May 31, 2024
May 31, 2024
Moth infestations can cause damage to items in your home. Learn how much moth extermination costs and ways to save in this informative guide.
Exterior detail of a victorian house roof with chimney
Aug 27, 2024
Aug 27, 2024
Bats may have their benefits, but you don't want them taking up residence in your home. This guide will help you understand bat removal costs.
Home with palm trees around exterior
Aug 15, 2024
Aug 15, 2024
Noticing scorpions around or inside your home? In this guide, learn how to get rid of scorpions (and deter them from coming back) in six simple steps.
Mother and daughter making smoothies
Jul 10, 2023
Jul 10, 2023
While there are thousands of species of roaches in the world, these are the 10 common types to watch out for. Defend your home with knowledge and practical tips.
Spraying disinfectant on surface
Oct 30, 2024
Oct 30, 2024
Bed bugs are tricky to eradicate, but certain substances can kill them on contact. Find out what kills bed bugs instantly and when to call in a pro.
Share project details to get started.