4 DIY Fruit Flies Traps Made From Pantry Staples
Fruit flies, also called gnats, can be a big nuisance in your home, multiplying quickly and becoming an infestation. The good news is: you can effectively get rid of them and stop them from coming back. From homemade traps to prevention methods, you can rid your home of these pests for good.
There are many ways to get rid of a fruit fly infestation. Then we’ll add some future prevention tips at the end of the article. Because it’s easier to avoid these pests in the first place than to get them out after they’ve taken over your home.
DIY Traps to Get Rid of Fruit Flies
To make these diy fruit fly traps, you can use items you probably already have in your kitchen. Leave the traps out overnight. In the morning, you’ll be able to see the caught flies, and then you can wash them out. Sometimes you may need to use them a few nights in a row.
These traps shouldn’t be dangerous to cats and dogs, but they’re messy. So it’s a good idea to keep pets away from them anyway. Don’t let smaller pets into the room where the trap will be working overnight.

1. The Apple Cider Vinegar and Dish Soap Trap
This fly trap is easy to make with just a few household ingredients, like apple cider vinegar and dish washing liquid. The vinegar attracts the flies and the dish washing liquid prevents them from escaping.
You can also use mineral oil instead of dish washing liquid.
Place this trap in a room of your house or in a shady area of your yard, if that’s where you’re seeing them.
- Fill the bottom of a dish or glass jar with apple cider vinegar. You can add fruit or veggie peels and cores to the bait to attract even more flies. You can also use beer or wine, fruit juice or balsalmic vinegar.
- Pour in a couple of drops of dishwashing liquid. Stir it in until it dissolves.
- Flies will find the vinegar, climb in and get caught in the dish liquid.
- Change out the trap every other day or when it’s full of flies.
2. The Wine or Beer with Plastic Wrap Trap
- Don’t quite finish a bottle of beer. Leave a little in the bottom. You can add overripe fruit, wine, vinegar – anything that ferments, especially bananas.
- Put it where you’ve seen the most flies in your home, and cover the top with cellophane. Secure it on there with a rubber band or tape.
- Punch small holes in cellophane with a needle.
- Flies will squeeze through the holes to get the beer, but not be able to climb back out.
3. The Milk, Sugar, and Pepper Trap
This old-school method has been around for decades and is easy to make:
- Mix about 1 cup of milk, 4 tablespoons of sugar, and 2 tablespoons of ground black pepper in a saucepan.
- Heat the mixture gently until it just starts to simmer, then pour it into a shallow dish or bowl.
- Place it where you’ve noticed the most fruit fly activity.
The sweet milk mixture attracts the fruit flies, while the pepper traps them in the liquid. This trap is especially useful in kitchens and pantries.
4. The Vinegar and Funnel Trap
This method works similarly to the plastic wrap trap but uses a homemade paper funnel instead:
- Take a clean jar or glass and fill it with apple cider vinegar.
- Roll a piece of paper into a cone shape, leaving a small opening at the tip that’s just wide enough for flies to enter.
- Place the cone in the jar with the narrow end pointing down, but not touching the vinegar.
- Secure it with tape if needed to keep it in place.
Flies will go into the cone to get to the vinegar but won’t be able to find their way back out.
Not working?
If you’re not having any luck with these methods, it may be because the traps are not placed in the right location. You need to put them in the room where you see flies most often.
If you’re unsure where flies might be congregating at night, the kitchen is often a good place to start looking, as that is where food is typically kept. Near the sink drain is usually a good bet.
Another possibility is that your infestation isn’t fruit flies at all, but rather drain flies. You’ll need slightly different methods for catching them.
But if you’ve made several attempts, you’re pretty sure your pests are fruit flies, and the traps just don’t seem to be working, you can try some store bought products.
Products you can try
A fly trap product you purchase from a store will function in a similar manner as the DIY versions mentioned above. Therefore, if the DIY methods didn’t work, it’s unlikely that the store-bought product will work either. Flypaper traps are messy and not worth the trouble if they aren’t likely to work.
If you’re looking for alternatives to traditional bug traps, your best option is a Bug Zapper. There are a variety of these available, including versions that can be hung on a porch to attract insects, ones that look like tennis rackets that you can use to swat flies, and others that are more like nightlights for indoor use.
They are effective and safe for kids and pets, but a small electric shock is emitted, so it’s still a good idea to put them where kids and pets can’t reach them.
You can also use a bug spray. Any spray that can end a bug is going to be at least a little bit toxic to people, pets and/or house plants. If you’re not comfortable spraying traditional bug sprays like Hot Shot in your kitchen, you can try a less toxic spray like EcoVenger.
Preventing fruit fly infestations
The best thing you can do is to avoid an infestation in the first place. To make your home less inviting to pests, start by removing food sources that they’re attracted to. Fruit flies are especially fond of ripe or rotting fruit and produce.
They love fermented foods such as beer and wine. If you spill beer or leave empty bottles in an open trash container, they will be drawn to your home. They are also fond of garbage disposals and trash cans, particularly if there is anything rotting or fermenting inside them.
To keep them from infesting your home in the first place:
- Don’t keep rotten fruit or produce in your home. Put it in a closed trash container or compost it.
- Clean up spills of sweet drinks or food as quickly as possible. A little sticky patch on your kitchen countertop or soaking into a rug or carpet will attract fruit flies, ants and other unwanted insects.
- Don’t let smelly garbage stay inside your home. If it’s starting to smell, take it outside to a trash can or bin.
- When you bring produce home wash it by hand with cool water. That will get rid of any fly eggs or larvae.
- Protect fruits that sit on the countertop with a food umbrella.
Rethink Your Composting Habits
If you compost food scraps, your bin could be inviting fruit flies. Here’s how to manage compost effectively:
- Use a sealed compost bin with a tight-fitting lid to keep flies out.
- Freeze food scraps if you can’t take them to your compost pile daily.
- Cover fresh food scraps with dry materials like shredded newspaper or brown leaves to reduce odors that attract flies.
Clean Your Drains and Garbage Disposal
Drains and garbage disposals can be hotspots for fruit flies if food particles are trapped inside them. Regular cleaning can reduce infestations:
- Pour boiling water down your drain once or twice a week to get rid of any eggs or larvae.
- Use baking soda and vinegar by sprinkling about half a cup of baking soda into the drain, followed by half a cup of vinegar. Let it fizz for 10 minutes before flushing with boiling water.
- Deep clean your drains using a long-handled brush or specialized drain cleaning tool to remove buildup that may harbor flies.
Keep Your Trash Can Fruit Fly-Free
Trash cans can draw fruit flies, especially if they contain food waste. Follow these tips to keep your trash area clean:
- Line your trash cans with bags to contain odors and make cleanup easier.
- Take out the trash regularly, especially if it contains food waste or has started to smell.
- Clean trash cans weekly with soap and water, and occasionally disinfect them with vinegar or a bleach solution.
Inspect Your Pantry
Fruit flies can also be attracted to open or spoiled food in your pantry. Here’s how to prevent this:
- Store dry foods like flour, cereal, and snacks in airtight containers.
- Check for spoiled produce, like potatoes or onions, that might be hiding in your pantry.
- Wipe down pantry shelves regularly to remove crumbs or spills that may attract pests.
Use Essential Oils
Essential oils can naturally repel fruit flies while giving your home a pleasant scent:
- Mix 10–15 drops of essential oil (like peppermint, eucalyptus, lemongrass, or lavender) with 1 cup of water in a spray bottle.
- Spray this mixture around countertops, sinks, drains, and trash cans where fruit flies tend to gather.
While essential oils won’t get rid of fruit flies, they can help discourage new ones from entering your home.
Set Up Fans
Fruit flies are poor fliers and struggle in strong air currents. Setting up a fan near problem areas like your kitchen sink or trash can may deter them from hovering in those spaces.
Check for Overripe Produce Outdoors
If you have fruit trees or vegetable gardens outside, they could be attracting fruit flies to your home:
- Harvest ripe fruit promptly and remove any fallen fruit from the ground.
- Consider using outdoor fly traps near trees or garden beds to catch flies before they enter your home.
Monitor Your Houseplants
Sometimes what you think are fruit flies may actually be fungus gnats that are attracted to moist soil in houseplants:
- Allow the soil to dry out between waterings to deter gnats from laying eggs.
- Use sticky traps placed near the plants to catch adult gnats.
- Add a layer of sand or diatomaceous earth on top of the soil to discourage egg-laying activity.
Keep Windows and Doors Sealed
Fruit flies can easily enter your home through open windows or doors:
- Install fine mesh screens on windows and doors to block entry points.
- Seal any gaps or cracks around windowsills or doorframes with caulk to close off potential entryways for pests.
When to Call an Exterminator
If you’ve tried every DIY solution and still can’t get rid of fruit flies, it might be time to call in professional pest control services. Experts can identify the source of the infestation and use targeted treatments to eliminate it entirely.
Last Updated:
Read This Next










