How to Get Rid of Flies

Last updated September 7, 2023
Knowing how to get rid of flies can help you keep these pests out of your home for good. While they are great environmentally, flies are a nuisance when they invade your kitchen and home since they can carry bacteria and diseases. Getting rid of flies can seem like a never-ending task, especially in the summer, but this guide will teach you how to get rid of house flies and prevent them from returning.
Table of Contents
What Attracts Flies?
What Is the Best Way to Get Rid of Flies?
What Are Natural Fly Repellents?
How Do You Prevent Flies?
What Attracts Flies?

The first step in getting rid of flies is knowing what attracts them in the first place: food sources and ideal breeding areas.
House flies feed on decaying organic material and waste, which includes kitchen garbage, pet waste and even animal food. For this reason, you will often see flies swarming around trash cans, outdoor restrooms and outdoor animal enclosures. Flies will also be attracted to kitchen drains that have built-up food residue, bird feeders and animal carcasses.
Flies are also drawn to warmth and light, which is why homes are at such high risk for fly infestations. In a warm environment, flies can live up to three months and are prolific breeders. Mature female flies can lay up to 900 eggs over the course of their lives, which will hatch within 12- to 24- hours. Left unchecked, flies can produce two or more generations per month. The best way to get rid of flies is to start treatment and prevention early, before they begin to breed in excess.
What Is the Best Way to Get Rid of Flies?

There are any number of treatments that can be used to combat flies, but some are more effective as indoor fly treatment and others are strictly intended for outdoor use. Read all application directions and warnings on any fly killers or repellents and tailor treatment to specific areas.
Getting rid of flies in your home may require a combination of treatments, repellents and preventative measures. Expect to build a customized solution with multiple products and techniques, which may include fly bait, fly traps, fly foggers and more.
What Are Natural Fly Repellents?

While focusing on how to get rid of house flies, you can also take measures to repel them from your home. Electronic or flame torches can help keep flies and other insects away from outdoor spaces, and there are plenty of
natural fly repellents that you can use simultaneously for the best protection.
One common treatment uses cayenne pepper steeped in water as a spray treatment. Spritz in doorways and around windowsills and the sharp odor will keep the flies away. Pepper spray is non-toxic, but the smell may be unpleasant to some people.
Consider using common garden plants to repel flies. Strong herbs such as lavender, mint and bay leaf can be planted in window boxes to discourage flies from entering windows. You can also plant these herbs in pots and place them in the kitchen and elsewhere around the home. Flies also avoid marigolds and nasturtium, so incorporate these flowers into your garden beds or outdoor pots close to the home and its doorways to keep flies outside.
While it can be helpful to find natural products to aid in fly prevention, a large-scale infestation will likely require the use of more stringent fly killers.
How Do You Prevent Flies?

Flies can't be controlled unless you take the proper prevention methods. By cutting off fly access to the home and any food sources, you'll better be able to get rid of flies inside the home and keep them away for the long-term.
- Check and repair screens and seal around windows. Flies can find their way into the home through very small gaps. In addition to sealing up windows, look for other places where the flies may invade. This may mean adding or replacing weather stripping around doors, keeping doors and windows closed whenever possible and sealing gaps in corners where exterior walls meet.
- Rethink food storage. Store produce and condiments in the refrigerator to help deprive flies of any food sources. Keep cereal, grains and sugar in airtight containers with tight-fitting lids. Do not leave open drink containers or wine glasses out; once empty, rinse them with warm water to remove any sweet residue that might attract flies.
- Clean vigilantly. If you are collecting compost material in your kitchen, be sure the receptacle has a tight-fitting lid and is emptied regularly. You may also want to use compostable bin liners to make collection easier. Clean up spilled food from floors and countertops immediately and keep an eye out for pieces of food that drop under counters or appliances while cooking. Locate potential fly breeding areas, including drains, underneath appliances, inside the dishwasher or any spot where there is moisture and food debris, and clean them thoroughly.
- Maintain waste cans. Empty and scrub trash cans inside and out to remove any old food particles. Use trash can liners to help keep cans clean inside.
If you have a diaper pail, be sure to keep it tightly sealed when in use and to empty and clean it regularly. - Tidy up the landscape. Keep dead leaves and yard waste cleaned up, as these can harbor flies. Place any manure or compost piles a minimum of 20-feet from the home to discourage flies from making a move indoors.
Tip: Once you have treated the major fly problem, keep a fly swatter on hand to quickly kill stragglers.
The best way to get rid of flies quickly and permanently is to combine many types of treatments and prevention methods. Start with the use of a trap or other fly-killing treatments to deal with the immediate fly problem, then move on to incorporating repellents and natural solutions to keep more flies out. Once you know how to get rid of flies and they are out of your home, start preventative measures to keep them away for good.
Ready to find the supplies you need to shoo flies from your home? Use The Home Depot app to locate products and check inventory on millions of online products.