There is a pest that appears in every home. Though it’s barely larger than a pencil point, its capacity to annoy is boundless. The culprit is the fruit fly, and with the official start of summer fast-approaching, you’ll be battling them in the coming months.
So, how do you get rid of fruit flies? Though it may seem like an impossible task, there are quite a few steps you can take to banish fruit flies and prevent another infestation. From DIY traps to some basic preventative best practices, we’re covering all of the best ways to achieve a fruit fly-free apartment. Here is everything you need to know about how to get rid of fruit flies — and keep them away.
Fruit Flies 101
First thing’s first. Let’s start with how these pests end up in your home.
Fruit flies feed on decaying fruits and veggies. They also use rotting fruit as a mating ground to reproduce. Though they can enter your home through a window or door, it’s most common for fruit flies to hitch a ride into your house on produce. Unfortunately, they can reproduce at an alarmingly fast rate: Female fruit flies can lay hundreds of eggs during their brief lives, which only lasts 40-50 days. The eggs hatch within 24-30 hours and the maggots feed on fermenting fruit and veggies.
Best Practices For A Fruit Fly-Free Home
If you want to protect your home from fruit flies, wash your fresh produce as soon as you bring it home to clean off any fruit fly larva or eggs before they have a chance to hatch.
To achieve a fruit fly-free home, you have to be diligent about getting old fruits and veggies out of the house. But even fresh fruit can lead to fruit flies, so to be on the safe side, consider storing your produce in your refrigerator instead of the countertop.
Trash will attract fruit flies, especially if you’re throwing away lots of fruit and veggie scraps. Freeze your scraps before throwing them away to kill off any eggs that are waiting to hatch.
It also helps to keep your kitchen as clean as possible. Wipe down your countertops and kitchen sink to remove leftover debris. Clean cans and bottles before tossing them in the recycling bin. Scrub your recycling and garbage cans to remove any lingering foods or liquids that could attract pests.
Fruit Fly Repellents & Traps

How To Get Rid of Fruit Flies With Basil or Rue
Basil can act as a natural deterrent to fruit flies. Simply place a few fresh basil leaves in and around your fruit basket to keep fruit flies at bay. An alternative option is rue, which is less common but works just as well as basil.
If you have a fruit fly infestation, try this DIY fruit fly trap:
You can create a “cone of death” with just a few basic household items.
- Place a tempting treat to lure fruit flies into your trap at the bottom of a jar. Good options include a banana, a slice of lemon, apple cider vinegar or some red wine.
- Next, create a funnel cone with paper, and place the cone at the top of the jar.
- That’s it! Now, all you have to do is sit and wait.