Stopping flies from bothering you inside your home or outside in the yard mainly comes down to this: don’t give them a reason to stick around. Flies are more than just annoying-they can carry many germs and spread them on food and surfaces, which can be risky for your health. Although there are many ways to get rid of flies, the best way is to figure out what they want and remove it from your home or yard. This simple guide covers easy steps and a few extra tricks to keep flies away for good, whether you like natural solutions or need something a little stronger.

Why Are Flies Attracted to Your Home or Yard?
Flies look for food, water, and a place to lay eggs. If your home has any of these, they’ll show up. If you remove what attracts them, you’ll have a lot fewer flies to worry about.
Food Left Out or Spilled
Flies love decaying food, including fruits left out on the counter, crumbs under the table, or sticky spills on the floor. They also go after sugary drinks and even the smell of recent cooking. Clean up quickly to keep them from moving in.
Garbage, Compost, and Rotten Waste
Garbage cans with food scraps are major fly hangouts. Flies will also lay eggs in compost piles or areas where grass clippings and leaves pile up. In cities with heat and humidity, like Miami, keeping garbage cans clean is even more important to avoid attracting flies.
Humidity, Water, and Drains
Warm and damp areas are perfect for flies, especially spots with puddles or standing water. Drains with gunk in them are also very appealing to fruit flies and drain flies. Make sure your home is dry and your drains stay clean.
Open Doors and Windows
Flies can get in through any gap, like open doors, broken screens, or cracks around your windows. These small openings make it easy for flies to enter, so it’s important to check and fix any leaks in your home’s barriers.
Main Things That Attract Flies | Examples |
Food | Fruit, crumbs, spills, sugary drinks, pet food |
Garbage/Compost | Open trash bins, rotting food, uncovered compost |
Water & Humidity | Puddles, wet drains, humid rooms |
Entry Points | Cracks, torn screens, open windows/doors |

How to Stop Flies from Getting In
Make your home less inviting to flies while blocking off ways they can enter. This is much easier than trying to get rid of them later.
Seal Gaps and Fix Screens
- Check all windows, doors, and vents for cracks, holes, or tears.
- Seal any gaps with caulk and fix torn screens as soon as possible.
- For extra protection against tiny fruit flies, try extra-fine mesh screens.
Keep Food in Sealed Containers
- Put food, especially fruits and leftovers, in sealed containers.
- Don’t leave dirty dishes out-clean them right away.
- Seal smelly food scraps in a bag or keep them in the freezer until trash day.
Clean Up Crumbs and Spills
- Wipe up spills, crumbs, and sticky spots immediately, especially in the kitchen.
- Wash pet food bowls regularly and don’t leave uneaten food out for long.
Take Care of Trash and Compost
- Use cans with tightly fitting lids and empty them often.
- Wash trash bins regularly with soapy water.
- If you compost, use a bin with a tight lid and turn the pile often.
Natural Ways to Keep Flies Away
If you want to avoid chemicals, there are plenty of natural tricks to send flies packing. Many of these use plants or smells flies don’t like.
Grow Fly-Repelling Plants
Some plants have scents that flies try to avoid. Grow these near doors, windows, or anywhere flies gather.
Plant | Why It Works |
Basil | Strong smell; flies hate it |
Lavender | Pleasant for people, but drives away flies |
Rosemary | Woody scent deters insects |
Mint | Pungent odor that keeps flies away |
Marigolds | Emits a chemical flies don’t like |
Citronella grass | Commonly used in bug sprays |
Catnip | Very effective at keeping bugs away |
Garlic (outdoors) | Keeps flies out of gardens |
Eucalyptus, Tea Tree | Essential oil versions work too |

Try Orange Peels and Cloves
- Scatter orange peels around areas where flies hang out.
- For more power, stick cloves into citrus halves and leave them in trouble spots.
Burn Citronella Candles or Incense
- Citronella candles can keep flies away from small outdoor areas.
- Incense or “mosquito sticks” also work, but don’t use these near anything flammable.
Make Your Own Fly Repellent Spray
- Add 10-15 drops of peppermint, lavender, eucalyptus, or lemongrass oil to a spray bottle of water. Shake and spray where flies show up.
Set Up Apple Cider Vinegar and Soap Traps
- Fill a jar with apple cider vinegar, add a couple drops of dish soap, and cover with plastic wrap poked with holes. Flies will go in, but they can’t get out.
Use Cayenne Pepper Spray
- Mix one tablespoon of cayenne pepper in two cups of hot water. Cool, strain and spray around entry points (don’t use directly on food).
Penny and Water Bag Trick
- Fill a clear plastic bag with water and drop in some pennies. Hang it near doors or outdoor eating areas. The light reflections seem to confuse flies and keep them away.
Hang Old CDs or Reflective Objects
- Hang shiny CDs or spinning decorations outside-moving light reflections seem to scare off flies.

Products and Tools for Fly Control
If you need a stronger approach, lots of products are available in stores to help with flies.
Sticky Traps and Fly Paper
- Hang sticky strips in places where flies gather. They’ll get stuck and can be thrown away with the trap.
- Don’t hang these right by food, and keep out of sight for looks.
Bug Zappers and Light Traps
- Use light traps (bug zappers) inside or outside-they draw in and kill flies.
- Place these away from doorways or windows so you don’t attract even more flies inside.
Insect Sprays
- Sprays with pyrethrin can quickly kill flies, but they don’t keep them away for very long.
- Always follow label directions and keep people and pets away until the spray is dry.
When to Use Chemicals
- Only spray indoors if the label says it’s safe for indoor use.
- Ventilate the room well and keep kids and animals out until it’s safe.
- Use outdoors mainly around the house’s edge-not all over the yard, to protect good bugs and the environment.
Why Pick Natural Remedies Instead of Sprays?
Natural Ways | Store-Bought Chemicals |
Safe for people, pets, and the planet | Could cause health or allergy problems |
Use ingredients you already have | Need to buy each new bottle or trap |
Cost less in the long run | Can get expensive over time |
Better for the environment | Can harm helpful insects, pollute soil/water |

Specific Tips for Different Spots
How to Keep Flies Away from Porches and Patios
- Set out citronella candles or torches and potted repellent plants near seating.
- Try the penny and water bag trick on porches.
- A box fan pointed at seating keeps flies away since they can’t fly well in wind.
- Clean up food and seal garbage bins after meals.
How to Keep Flies Out of Kitchens
- Keep your kitchen clean by wiping up crumbs and spills right away.
- Don’t leave dishes in the sink; wash them or put in the dishwasher immediately.
- Put all food in airtight containers, including fruit and bread.
- Empty the trash often, and make sure the bin closes tightly.
- If fruit flies gather, set a vinegar and soap trap on the counter.
- Pour hot water down drains to break up any organic buildup.
How to Handle Trash and Compost Bins
- Rinse trash cans and compost bins often, especially in the summer.
- Double-bag stinky food waste to hold in odors.
- If you compost, turn the pile often and cover fresh scraps.
- Clean up pet droppings from your yard right away.

How to Keep Flies Away for Good
Stay Clean All Year
- Clean up food messes and keep dishes done, every day, all year.
- Seal food and keep garbage cans closed and wiped down.
- Deep clean hidden areas every three months, like under appliances or bins.
Check Entry Points Often
- Regularly look over window screens, doors, and any vents for possible openings.
- Repair any holes or cracks right away.
- In warm months, check these weekly and replace old weather stripping if needed.
Watch for Problem Areas and Change Methods if Needed
- Notice where flies gather and adjust your plan for those areas.
- If one natural method isn’t working, switch or mix up your approach.
- Keep trying and adjust with the seasons for best results.
Frequently Asked Questions
Are Flies Really Dangerous?
Yes, houseflies can carry lots of germs and spread them to your food and home. This can make you and your family sick. They pick up bacteria from trash and waste, and deposit them everywhere they land.
Do Home Remedies Actually Work?
Yes, for most mild or average fly problems, home remedies like vinegar traps and essential oil sprays can help a lot. But if you have a big fly problem, you might need to use several methods or call a professional.
What if Natural Methods Don’t Help?
If flies don’t go away, the main reason is usually something is still attracting them, like hidden food or garbage. Try a mix of physical traps (sticky strips, light traps) and natural methods. If you still have a problem, contact an expert.
When Should You Call a Pest Professional?
If you have a fly problem that keeps coming back, or you spot flies breeding in hard-to-clean places, call a pest control company. They can find and fix the reason for your fly infestation and use safe treatments to get rid of them for good.