7 DIY Gnat Traps That Actually Work Overnight (Get Rid of Gnats Fast!)

7 diy gnat traps that actually work overnight

Gnats are one of those pests that seem to appear out of nowhere—one day your kitchen is fine, the next there’s a cloud of tiny flies hovering over the fruit bowl or circling your houseplants. And once they’re established, they multiply fast. A female fungus gnat can lay up to 300 eggs in her short lifespan. Fruit flies aren’t much better.

The good news is that gnats are also one of the easier household pests to trap and eliminate with materials you already have at home. Most commercial gnat traps use the same basic principles as the DIY versions—they just charge significantly more for them. The traps in this guide range from the classic apple cider vinegar setup to no-vinegar alternatives for people who can’t stand the smell, sticky traps, and a few less commonly known methods that work surprisingly well.

Before building any trap, though, it helps to know what you’re actually dealing with—because the most effective trap depends on the type of gnat.

Know What You’re Trapping: Fungus Gnats vs. Fruit Flies

Most people use the word “gnats” to describe any small flying insect in the home, but the two most common types require slightly different approaches:

  • Fruit flies are brown or tan, about 3mm long, with distinctive red eyes. They’re attracted to fermenting fruit, sugary spills, and organic matter in drains. They breed in ripe or rotting produce and in the organic film that builds up inside drains.
  • Fungus gnats are darker, thinner, and more mosquito-like in shape. They’re attracted to moist soil and breed almost exclusively in the damp top layer of houseplant soil. If your gnats are concentrated near plants rather than food, these are almost certainly what you have.

Apple cider vinegar traps work best on fruit flies. Fungus gnats are less attracted to vinegar and respond better to the soil-based and sticky traps in this guide. Knowing which type you have determines which traps to prioritize.

What You’ll Need (Depending on the Method)

  • Apple cider vinegar
  • Red wine or white wine
  • Dish soap
  • Sugar
  • Overripe fruit (banana or mango work best)
  • Sticky tape or yellow sticky cards
  • A candle
  • Hydrogen peroxide
  • Small bowls, jars, or glasses
  • Plastic wrap
  • A toothpick or skewer
  • Cooking spray or petroleum jelly

Trap 1: Apple Cider Vinegar and Dish Soap Trap (Best for Fruit Flies)

This is the most widely recommended DIY gnat trap for good reason—it’s consistently effective, requires almost nothing to set up, and works overnight. Apple cider vinegar mimics the smell of fermenting fruit, which draws fruit flies in. The dish soap breaks the surface tension of the liquid so they sink rather than landing on the surface and flying away.

  1. Pour about half an inch of apple cider vinegar into a small jar, glass, or bowl. The container doesn’t need to be large—a short wide glass or a mason jar works perfectly. Deeper is better than wider for this trap, as the scent concentrates and rises from a narrower opening.
  2. Add two to three drops of dish soap to the vinegar and stir very gently. You want the soap mixed in without creating a lot of bubbles—bubbles on the surface reduce the trap’s effectiveness by giving gnats a surface to land on without touching the liquid.
  3. Cover the opening tightly with plastic wrap and secure it with a rubber band around the rim. Pull the plastic wrap taut so there are no slack areas where it sags.
  4. Poke eight to ten small holes in the plastic wrap using a toothpick or skewer. Make the holes just large enough for gnats to enter—roughly 2–3mm. Holes that are too large allow gnats to escape; holes that are too small prevent them from finding the entry point.
  5. Place the trap near the gnat activity—on the kitchen counter near fruit, beside the compost bin, or near the drain. Proximity matters significantly; gnats don’t travel far to investigate a scent.
  6. Leave overnight. By morning you should see gnats in the liquid—sometimes many of them, depending on the size of your infestation.
  7. Replace every two to three days or when the trap fills with gnats. The vinegar loses its potency as it becomes diluted with dead insects—fresh solution consistently outperforms old solution.

Why it works better with plastic wrap: Without the cover, gnats can approach from any angle and often escape. The plastic wrap funnel effect means they enter through the small holes—drawn downward by the scent—and can’t find the holes again to escape.


Trap 2: Red Wine Trap (Best Apple Cider Vinegar Alternative)

If you’re out of apple cider vinegar or simply can’t stand the smell in your kitchen, red wine is the next most effective fruit fly attractant. The fermenting sugars and tannins in red wine are irresistible to fruit flies—arguably more so than vinegar for some populations of fruit flies. A bottle with a small amount of wine left at the bottom makes an excellent ready-made trap without any assembly.

  1. Leave a bottle of red wine with about half an inch of wine remaining uncapped near the gnat activity. The narrow neck of the bottle acts as a natural funnel—gnats fly in toward the fermenting scent and can’t navigate back out.
  2. Add a drop of dish soap to the remaining wine to break the surface tension. Tilt the bottle gently to distribute it.
  3. Place near the fruit bowl or wherever gnats are most active and leave overnight.
  4. For a more powerful version, pour the wine into a wider jar, add dish soap, and cover with plastic wrap with small holes—the same setup as Trap 1 but with wine instead of vinegar.

White wine works too, though less effectively than red due to lower tannin content. Rosé falls somewhere in between. The older and more oxidized the wine, the better it works as bait—a bottle that’s been open for a few days is more attractive to fruit flies than fresh wine.


Trap 3: Overripe Fruit Trap (Best for Large Infestations)

For a severe fruit fly infestation where vinegar traps aren’t keeping up, overripe fruit bait is significantly more powerful. Nothing smells more like fruit flies’ preferred breeding ground than actual fermenting fruit—and when combined with a soap trap, it catches gnats faster than any liquid-only method.

  1. Place a small piece of very ripe or slightly overripe fruit—banana, mango, and peach work best—in the bottom of a jar or bowl. A slice the size of a coin is enough.
  2. Add a few drops of dish soap and a splash of water to the bottom of the jar around the fruit—just enough to create a shallow liquid layer that gnats fall into on contact.
  3. Cover with plastic wrap pulled taut and secured with a rubber band.
  4. Poke small holes in the plastic wrap—slightly larger than in the vinegar trap, since gnats are more actively seeking the fruit and will find larger openings more easily.
  5. Place near the primary infestation area and check in the morning.
  6. Replace the fruit every two days—once it starts to mold rather than just overripe, it becomes less effective as bait and more of a breeding ground, which is the opposite of what you want.

Combining this with Trap 1 in different locations simultaneously dramatically accelerates elimination. Place the fruit trap where gnats are most active and the vinegar trap near the secondary activity area.


Trap 4: DIY Sticky Trap (Best for Fungus Gnats Near Plants)

Sticky traps are the most effective method for fungus gnats specifically—the ones that breed in houseplant soil rather than in food. Fungus gnats aren’t particularly attracted to vinegar or fermenting fruit, but they are strongly attracted to the color yellow. Commercial yellow sticky traps use this principle; you can make an effective version at home for almost nothing.

Version A: Yellow card sticky trap

  1. Cut a piece of yellow cardstock or yellow foam into a rectangle—roughly 10cm x 15cm is a good size. The yellow color is the critical element; other colors don’t work nearly as well.
  2. Coat one or both sides generously with petroleum jelly (Vaseline), cooking spray, or a thin layer of honey. The stickier the surface, the more effective the trap.
  3. Attach to a wooden skewer or pencil using tape or by pushing the skewer through the card.
  4. Push the skewer into the soil of the affected houseplant so the yellow card sits just above the soil surface—about 2–3cm above. Fungus gnats travel close to the soil; a trap positioned too high misses most of them.
  5. Check every two to three days. When the surface is covered with gnats, replace with a fresh card. A heavily infested plant may fill a sticky card within 24 hours.

Version B: Tape sticky trap

  1. Fold a piece of yellow tape (painter’s tape works, though it’s not ideal) sticky side out, or use wide clear packing tape coated with petroleum jelly.
  2. Hang near the plant or prop against the pot where gnats are most active.
  3. Replace when full—typically every few days for an active infestation.

Important: Sticky traps catch adult gnats but don’t address the larvae in the soil, which are the source of the ongoing infestation. For complete elimination, combine sticky traps (to catch adults) with a hydrogen peroxide soil drench (Trap 7) to kill larvae.


Trap 5: Candle Trap (Best for Nighttime Use)

This method works on the principle that gnats—like many insects—are attracted to light and heat. A candle over a water dish catches them through a combination of both. It’s particularly effective after dark when other light sources in the room are turned off, making the candle the only light source.

  1. Fill a shallow dish or bowl with water and add a few drops of dish soap to break the surface tension.
  2. Place a candle in the center of the dish or directly behind it, positioned so the candle flame reflects in the water surface. A taper candle in a holder placed immediately beside the dish is the simplest setup.
  3. Turn off all other lights in the room and leave the candle burning. Gnats are drawn to the light and heat, fly toward the flame, and either fall into the water dish or singe their wings on the flame and fall in.
  4. Never leave a burning candle unattended and keep away from curtains, paper, and anything flammable. This trap requires you to remain in or near the room while it’s active.
  5. Check the water dish after 30–60 minutes. For a significant infestation, you’ll see gnats in the dish within the first few minutes.

This method works fastest in a dark room and is best used as a quick-knockdown method alongside the longer-running vinegar and sticky traps rather than as a standalone solution.


Trap 6: Sugar and Yeast Trap (Best DIY Gnat Trap Without Vinegar)

For people who don’t have apple cider vinegar or don’t want the smell, this is one of the most effective no-vinegar alternatives. Yeast fermenting with sugar produces carbon dioxide—which attracts gnats strongly, as they associate CO2 with the same fermentation processes that produce their food.

What you’ll need:

  • 1 cup warm water
  • 1 tablespoon sugar
  • ¼ teaspoon active dry yeast
  • A plastic bottle (a 500ml water bottle works perfectly)
  • Dish soap

Instructions:

  1. Cut the plastic bottle in thirds—you’ll use the bottom two thirds as the base and the top third as a funnel.
  2. Dissolve the sugar in the warm water in the bottom section of the bottle. Stir until fully dissolved.
  3. Sprinkle the yeast over the sugar water—don’t stir. The yeast will begin fermenting within 15–30 minutes, producing carbon dioxide and a faint fermenting smell that attracts gnats.
  4. Add two drops of dish soap to the liquid.
  5. Invert the top section of the bottle (with the cap removed) into the bottom section, creating a funnel. The narrowed neck points downward into the liquid—gnats enter through the top, travel down the funnel toward the CO2 and scent, and can’t find their way back out.
  6. Tape the two sections together if they don’t fit snugly.
  7. Place near the gnat activity and leave overnight.
  8. Replace the solution every three to four days as the yeast stops actively fermenting and the CO2 production drops.

This trap works on both fruit flies and fungus gnats more broadly than vinegar-based traps, making it a good general-purpose option when you’re not sure which type of gnat you’re dealing with.


Trap 7: Hydrogen Peroxide Soil Drench (Best for Eliminating Fungus Gnat Larvae)

This isn’t technically a trap—it doesn’t catch adult gnats. But it’s the most important method for anyone dealing with fungus gnats in houseplants, because it’s the only household method that kills the larvae in the soil where the gnats are actually breeding. Without addressing the larvae, sticky traps and other adult-catching methods fight an endless battle against a source that keeps replenishing.

What you’ll need:

  • 3% hydrogen peroxide (standard drugstore concentration)
  • Water
  • A watering can

Instructions:

  1. Mix one part 3% hydrogen peroxide with four parts water in a watering can. This gives you a 0.75% hydrogen peroxide solution—strong enough to kill larvae but not damaging to plant roots at this dilution.
  2. Allow the soil of affected plants to dry out first as much as the plant can tolerate. Fungus gnat larvae thrive in moist soil—a drier soil environment is less hospitable to them and makes the hydrogen peroxide drench more effective by having it penetrate rather than dilute into already-saturated soil.
  3. Water the affected plant thoroughly with the hydrogen peroxide solution, until it drains from the bottom of the pot. The solution needs to reach the full depth of the soil where larvae live—a surface application isn’t enough.
  4. You’ll see fizzing in the soil as the hydrogen peroxide contacts organic matter—this is normal and harmless to most plants. It indicates the solution is active and working.
  5. Repeat once a week for three to four weeks. Fungus gnat larvae hatch in waves—a single treatment kills the current larvae but not unhatched eggs. Weekly treatments over a month break the full breeding cycle.
  6. Combine with sticky traps (Trap 4) to simultaneously catch the adult gnats that are still flying and laying eggs while the larvae die off.

Trap Comparison at a Glance

TrapBest ForWorks OvernightAddresses Larvae
Apple cider vinegar + dish soapFruit fliesYesNo
Red wineFruit flies, no vinegar smellYesNo
Overripe fruitLarge fruit fly infestationsYesNo
DIY sticky trapFungus gnats near plantsYesNo
Candle trapQuick knockdown, nighttimeYes (while burning)No
Sugar and yeastBoth types, no vinegarYesNo
Hydrogen peroxide drenchFungus gnat larvaeNo (weekly treatment)Yes

Why You Have Gnats: Fixing the Source

Traps reduce the gnat population but don’t eliminate the source. If you don’t address what’s attracting and breeding them, the population will recover between trap sessions. The most common sources:

  • Overripe or rotting fruit left out. Fruit flies can detect fermenting fruit from up to a mile away. Refrigerate fruit once ripe, especially in warm months.
  • Damp houseplant soil. Fungus gnats breed almost exclusively in the top two inches of wet soil. Let soil dry out completely between waterings—most houseplants do better with this approach anyway.
  • The kitchen drain. A film of organic matter coats the inside of kitchen drains and is a prime fruit fly breeding ground. Pour a kettle of boiling water down the drain weekly, followed by a baking soda and vinegar treatment, to clear it.
  • The compost bin. Indoor compost is a significant gnat attractor. Keep a tight lid on indoor compost bins and empty frequently.
  • Standing water. Any standing water—pet bowls changed infrequently, saucers under plants holding water—provides a moisture source.
  • Forgotten produce. A potato, onion, or piece of fruit that’s rolled under the refrigerator or to the back of a cupboard and started decomposing is often the source of an infestation that seems to have appeared from nowhere.

Tips to Make Your Traps More Effective

  • Place multiple traps. One trap covers a limited area. For a significant infestation, place traps in every area where gnats are active simultaneously.
  • Position traps at gnat height. Gnats fly low. A trap on the counter is more effective than one on a high shelf—place traps at the level where you see them most.
  • Replace regularly. Old bait loses its attractant potency. Fresh vinegar, wine, or fruit consistently outperforms solution that’s been sitting for five days.
  • Combine methods. No single trap eliminates an infestation alone. Vinegar traps for adults, hydrogen peroxide for fungus gnat larvae, and source elimination together give the fastest results.
  • Be patient with the first night. Traps work fastest when gnats have had time to find them—placing a fresh trap in the evening and checking in the morning typically shows better results than checking after an hour.

FAQ

Why aren’t my apple cider vinegar traps catching anything? Either the gnats are fungus gnats rather than fruit flies (which are less attracted to vinegar), the holes in the plastic wrap are too small to find, the trap is positioned away from where the gnats are most active, or the dish soap content is too high and deterring them before they enter. Try removing the plastic wrap entirely for one night to see if gnats approach the open vinegar—if they do, the hole size is the issue.

How long does it take to get rid of gnats completely? With active trapping and source elimination simultaneously, most fruit fly infestations resolve within one to two weeks. Fungus gnat infestations take three to four weeks of combined trapping and weekly hydrogen peroxide soil drenches to break the full breeding cycle.

Do DIY traps work as well as commercial ones? For fruit flies, DIY apple cider vinegar traps consistently match or outperform commercial sticky traps and plug-in units in independent comparisons. For fungus gnats, yellow sticky cards (DIY or commercial) perform similarly—the color is the active element, not any proprietary coating.

Can I use white vinegar instead of apple cider vinegar? White vinegar is significantly less effective. Fruit flies are attracted to the fermentation scent compounds in apple cider vinegar—the acetic acid in white vinegar is similar but lacks those fermentation byproducts that make the bait appealing. If apple cider vinegar isn’t available, the red wine or sugar-yeast trap is a better alternative than white vinegar.

The Bottom Line

The most effective overnight gnat trap for fruit flies is the apple cider vinegar and dish soap setup with a plastic wrap cover—it’s simple, cheap, and consistently catches the most gnats fastest. For fungus gnats, start with yellow sticky traps above the soil and follow up with weekly hydrogen peroxide soil drenches to kill larvae at the source. Whatever traps you use, combine them with source elimination—remove overripe fruit, let soil dry between waterings, and clean your drains. The traps reduce the population; removing the source is what ends the infestation.

Scroll to Top