How to keep flies away
There’s nothing more annoying than a fly buzzing around your home. Learn how to prevent house flies and keep them out for good.
Updated: May 25, 2025
Whether they’re circling your trash can or landing on your food, house flies can be a frustrating and unsanitary problem. These pests are drawn to homes because of food waste, garbage, animal waste, and moisture, all of which provide ideal spots for laying eggs and feeding. Once inside, they can also spread bacteria and contaminate surfaces on top of buzzing around your ears.
Fortunately, knowing how to keep flies away and taking steps to block them from entering your space can make a big difference. Learn how to identify house flies, what attracts them, and most importantly, how to keep house flies out of the house.
Identifying house flies
House flies are the most common fly found in homes. Before you learn how to prevent house flies, you need to know what they look like. The following are common physical traits and behaviors exhibited by house flies:
- Size: House flies are typically one-eighth of an inch to one-fourth of an inch (males are commonly smaller than females)
- Wings: Unlike many other winged insects, flies only have one pair of wings.
- Color: Flies typically have a dull gray to black color. The thorax also has four narrow stripes, though this can be hard to spot due to their small size.
- Mouthparts: House flies have sponge-like mouthparts for ingesting liquids. Thankfully, they do not bite.
Like all filth flies, house flies lay eggs (on animal feces and garbage), which will eventually hatch into small, white, legless maggots. If you’ve spotted these traits in the flies around your home, it’s time to explore house fly control options.
Steps to keep flies out and away
Flies can be tricky to keep out because they are small, fast, and incredibly persistent. This is especially true for different species, like fruit flies, since they’re even smaller and reproduce quickly. Since flies can squeeze through small cracks or fly in through open doors, you need a combination of tactics to stop them. Flies also reproduce very fast and thrive in warm weather, so a single missed garbage bag or uncovered plate can bring in more than a few unwanted visitors.
Cleanliness
Considering that house flies are commonly considered to be filth flies, this tip is probably no surprise. The most important parts of your home to keep clean are the kitchen, garbage containers, and food prep areas.
It’s helpful to take garbage out frequently and rinse recyclables before disposing of them. Garbage cans should also be cleaned regularly to prevent food decay and odors. If you’re not taking the trash out immediately, tie garbage bags tightly to reduce the odor that might attract flies. Clean crumbs and spills promptly, especially sugary substances that are likely to draw flies in.
Maintaining a clean space makes it harder for flies to find a food source or a place to breed, which is essential for effective fly prevention.
Exclusion
House flies can sometimes find their way inside by trailing behind a person through a door or by sneaking in through an open window. To help prevent house flies from making their way inside, use tight-fitting mesh screens on doors and windows. These screens should be free of tears, holes, or gaps that flies could enter through.
You can also install door sweeps and weather stripping around doors to block gaps at the base. Make sure windows are properly sealed and avoid leaving doors propped open for long periods of time, especially during warmer months when flies are most active.
Keeping your home sealed off is one of the most effective ways to keep house flies out of the house.
Outdoor Maintenance
House flies don’t just feed on human garbage; they also feed on animal waste and decaying organic matter. With this in mind, it’s important to keep your yard clean.
Properly dispose of animal waste or dead animals so that flies aren’t drawn in. If you have compost piles, cover them with black sheeting or secure lids to reduce odor and access.
If you have larger garbage cans outdoors, keep them covered and consider moving them as far away from doors as is feasible. Since garbage is a common place for house flies to lay their eggs, this step is crucial. The less access flies have to outdoor food and waste, the less likely they are to find their way indoors.
Trying DIY fly control
While prevention is key, using DIY methods is one way to get flies out of your house and can help reduce fly activity overall. Here are a few approaches you can try:
- Fly traps: Commercial sticky traps or homemade traps using vinegar and dish soap can attract and trap flies.
- Essential oils: Scents like eucalyptus, peppermint, lavender, and lemongrass are natural fly deterrents since flies hate them. Use them in sprays or diffusers since flies hate those scents.
- DIY spray: Mix water with a few drops of dish soap and essential oil to create a fly-repellent spray for entry points and surfaces.
- Citrus peels or cloves: Place citrus peels or cloves near windows or on countertops to naturally deter flies.
DIY methods can help reduce the presence of flies, especially when used with other prevention techniques. While they may not eliminate a full infestation, they’re effective for mild cases and as a supplement to your cleaning and exclusion efforts.




