There is no home in the world that is immune to an infestation of house flies, but there are some basic steps you can take to get rid of flies for good—or at least until a mess piles up again.

It's universally accepted that flies are disgusting, and for good reason. They feed on fecal matter and spoiled organic material such as eggs and meat. Flies regurgitate and excrete every time they land, which can transmit all kinds of grossness throughout a home. They've been known to spread up to 65 diseases including tuberculosis, typhoid fever, dysentery, and cholera. And if all of this wasn't gross enough, there is nothing more annoying than a fly buzzing around your head, when you are just trying to relax. But, thankfully we've got a solution to help you get rid of flies.

Clean Up

For flies to flourish they need a breeding ground to lay eggs, and many homes are ripe with moist organic matter that they really love. These include compost piles, garbage, and dog poop. If you leave trash cans dirty and uncovered, you can have maggots in less than a day and a few days later you'll have hundreds of flies to deal with.

Warm weather can compound the problem, so be vigilant about how you store and dispose of all of your trash and compost. Use tight lids for garbage bins and dispose of lawn and leaf clippings quickly. Like mosquitos, flies can breed in damp soil, so make sure you have no leaking outdoor faucets and no organic matter is washed into any soil.

Use Screens

Screened windows and doors are an effective way of preventing flies from entering your home. You can still enjoy cool summer breezes, without the threat of flies or other pests joining you. In the summer check your screens for holes and tears and repair them quickly using screen repair tape.

Flies can also enter through open vents, attics, around pipes, and crawl spaces, so make sure those areas are also screened or plugged using an expanding foam.

Flytraps and Swatters

Screens will keep the majority of flies out, but a few still always find a way into your home. The best way to deal with flies inside is to eliminate them as quickly as possible. Flytraps such as sticky tape, ultraviolet light traps, and fly baits, can be very effective for passively getting rid of flies without any gory mess.

A good old fly swatter is also effective, but is not very sanitary. A better option is an electronic paddle swatter, which kills bugs on contact without spreading fly guts across tables and walls.

Pesticides

Pesticides can offer short-term relief and should only be applied by a professional exterminator. But these toxic solutions can be harmful to you and your pets, so it's best to remove flies using other methods. Because flies don't have nests to eliminate like wasps, bees, or ants, the best way to remove a fly infestation is to remove all of their food and breeding areas.

Headshot of Timothy Dahl
Timothy Dahl
DIY Editor

Timothy is a lifelong DIY enthusiast who is fixated on smart home tech, beautiful tools, and wrenching on his FJ62 Land Cruiser.  He’s the DIY editor at Popular Mechanics and also the founder of the home improvement site, Charles & Hudson, the Webby-nominated family site, Built by Kids, and Tool Crave. When not working, you’ll find him on his board or bike enjoying the LA weather with his family and friends. Follow him on Instagram and Twitter.