How to Get Rid of Fruit Gnats in Your House for Good

The fastest way to get rid of fruit gnats is to eliminate their breeding sources, trap the adults already flying around, and clean your drains. Most people can clear an infestation within one to two weeks by combining all three steps at once. Tackling only one, like setting a trap without removing the rotting food they’re breeding in, will keep the cycle going indefinitely.

Before you start, it helps to know exactly what you’re dealing with. The tiny flies people call “fruit gnats” are usually one of three insects, and each one breeds in a different spot.

Identify What’s Actually Flying Around

True fruit flies are about an eighth of an inch long and look like tiny house flies with red or dark eyes and striped abdomens. You’ll find them hovering near fruit bowls, trash cans, recycling bins, and drains. They’re attracted to ripening fruit, sugary liquids, and alcohol.

Fungus gnats look more like miniature mosquitoes. They’re brown or black with light-colored legs, and they stay close to potted plants because their larvae develop in moist soil. If the tiny flies in your house seem glued to your houseplants, fungus gnats are your problem, not fruit flies.

Drain flies are fuzzy, moth-like insects that are light gray or tan. They breed inside the sludge that builds up in sink drains, floor drains, and sink overflows. You’ll usually see them sitting on nearby walls or ceilings rather than buzzing around food. Each of these pests needs a different approach, so identifying the right one saves you time and frustration.

Remove Every Breeding Source

A single female fruit fly can lay up to 400 eggs in her lifetime, depositing them in batches of one to 20 at a time on ripening produce. Those eggs hatch in two to four days. In warm conditions, a fruit fly can go from egg to adult in as little as seven days. That speed is why an infestation seems to explode overnight, and why removing breeding material is the most important step you can take.

Start with the obvious: throw out any overripe or damaged fruit and vegetables. Move produce you want to keep into the refrigerator. Then check the less obvious spots. Recycling bins with unrinsed wine, beer, or soda containers are major breeding grounds. So are broken or dirty garbage disposals, damp sponges, and wet mops, brooms, or cleaning rags left sitting out. Fruit flies don’t need a banana to reproduce. Any thin film of fermenting organic matter will do.

Take out your kitchen trash, wipe down the inside of the bin, and rinse every container in your recycling before it goes in the bin. Check under your refrigerator and stove for forgotten spills or produce that rolled out of sight. Clean the drip tray under your fridge if it has one. These hidden spots keep infestations alive even after you’ve cleaned the countertops.

Set Vinegar Traps for Adults

While you’re cutting off the breeding supply, you still need to deal with the adults already flying around. The simplest and most effective DIY trap uses apple cider vinegar and a drop of dish soap. Pour about half an inch of apple cider vinegar into a small jar or bowl, then add one or two drops of liquid dish soap and stir gently. The vinegar smells irresistibly sweet to the flies, and the soap breaks the surface tension of the liquid so their wings get weighed down and they sink instead of landing and flying away.

Place a few of these traps near the areas where you see the most activity: next to the fruit bowl, by the sink, near the trash can. Replace the vinegar every two to three days as it loses its potency. You can also cover the jar with plastic wrap and poke small holes in it. The flies crawl through the holes but have trouble finding their way back out. Both versions work, though the uncovered soap method tends to catch more flies faster.

If you don’t have apple cider vinegar, red wine or a piece of overripe banana placed inside a jar with a paper funnel works on the same principle. The narrow end of the funnel lets flies in but makes escape difficult.

Clean Your Drains Thoroughly

Kitchen and bathroom drains accumulate a layer of organic sludge that fruit flies and drain flies both use as a breeding site. Simply running water doesn’t remove it. Pour boiling water slowly down each drain to loosen buildup, then scrub the visible part of the drain with a stiff brush. For a deeper clean, pour half a cup of baking soda into the drain followed by half a cup of white vinegar. Let it fizz for 15 minutes, then flush with more boiling water.

For persistent drain problems, enzyme-based drain cleaners are more effective than chemical ones for this purpose. These products use microorganisms to digest the organic film clinging to the inside of your pipes, which eliminates the surface where flies lay eggs. Look for gel formulas that cling to pipe walls for extended contact time rather than liquid versions that wash through quickly. Use these treatments once a week until the flies are gone, then monthly to prevent them from coming back.

Don’t forget less obvious drains: the overflow hole in your bathroom sink, floor drains in the basement or laundry room, and the condensate drain line from your air conditioner.

Handle Fungus Gnats Differently

If the flies are hovering around your houseplants rather than your kitchen, you’re dealing with fungus gnats, and vinegar traps won’t solve the problem at its source. The larvae live in the top inch or two of moist potting soil, feeding on fungi and organic matter.

The most effective fix is to let your soil dry out completely between waterings. Fungus gnat larvae need consistently moist soil to survive. Adding a half-inch layer of coarse sand or decorative pebbles on top of the soil creates a dry barrier that prevents adult gnats from reaching the soil to lay eggs. Yellow sticky traps placed near the soil surface catch adults and help you monitor whether the population is declining.

For heavily infested pots, bottom watering (setting the pot in a tray of water and letting the soil absorb moisture from below) keeps the top layer dry while still hydrating the plant’s roots. If a particular plant is badly infested, repotting it in fresh, dry soil and a clean container can give you a faster reset.

Prevent Them From Coming Back

Once you’ve cleared the infestation, a few habits keep it from returning. Store ripe fruit in the refrigerator, especially in warmer months when fruit flies can complete their entire life cycle in about a week. Rinse bottles and cans before putting them in the recycling. Take out kitchen trash before it sits overnight. Wipe down counters and stovetops after cooking so there’s no residue for flies to feed on.

Run your garbage disposal regularly with cold water to prevent food from building up inside it. If you compost indoors, use a container with a tight-fitting lid and empty it frequently. Keep sponges and dish rags dry between uses, or swap them out for fresh ones every few days. These small changes remove the conditions fruit flies need, and without a food source and moist breeding site, they simply can’t establish a population in your home.