Tiny flies circling the fruit bowl or rising out of a houseplant are one of the most annoying problems in a home. They are not dangerous, but they breed fast: a single female fruit fly can lay hundreds of eggs, and a new generation can show up in about a week.

The trick is to do two things at once: remove what they are breeding in, and trap the adults that are already flying. Do only one and they keep coming back.

Fruit Flies or Fungus Gnats?

They look alike, but they live in different places, so it helps to know which one you have:

  • Fruit flies are tan with red eyes and hang around the kitchen: ripe fruit, the trash can, recycling, the sink drain.
  • Fungus gnats are darker and thinner, with long legs, and hover around houseplants. Their larvae live in damp potting soil.

If the flies are everywhere, you may have both. The steps below cover each.

Step 1: Remove What They Breed In

For fruit flies, clear out the food source:

  • Put ripe fruit in the fridge or a covered container.
  • Empty the trash and recycling, and rinse bottles and cans before they go in the bin.
  • Clean the sink drain: pour in boiling water (skip this for PVC pipes, use hot tap water), then scrub with a drain brush.
  • Wipe up spills under the toaster, coffee maker and fridge. If your coffee maker has a drip tray, empty it; our coffee maker cleaning guide covers the hidden spots.

For fungus gnats, the source is wet soil:

  • Let the top inch or two of potting soil dry out between waterings. Larvae need moist soil to survive.
  • Empty saucers so pots do not sit in water.
  • Cover the soil with a thin layer of sand or fine gravel.

Step 2: Trap the Adults

Cleaning stops new flies from hatching, but the adults you already have will keep laying eggs. Trap them at the same time.

Vinegar trap. Pour apple cider vinegar into a small jar, add a drop of dish soap to break the surface tension, and cover it with plastic wrap poked with a few small holes. Fruit flies go in and cannot get out. Replace it every few days.

Yellow sticky cards. Push them into houseplant pots to catch fungus gnats as they fly up from the soil.

Plug-in UV light trap. For a cleaner look that works around the clock, a plug-in light trap draws flying insects toward a glowing light and holds them on a sticky pad. It suits rooms where you do not want jars of vinegar on the counter.

Sponsored · Partner deal

Want a set-and-forget trap for the kitchen or a plant corner? The STEM plug-in trap uses a blue UV light to draw in fruit flies, gnats and moths and catches them on a sticky cartridge, with no chemical insecticides.

Ad: we may earn an extra commission from the brand if you buy through this link. Price and deal shown are from Amazon and can change.

Where to Put Traps

  • Next to the fruit bowl, trash can or sink, where fruit flies gather.
  • Near houseplants, at about pot height, for gnats.
  • Low on the wall and away from bright windows, so the trap’s light is the brightest thing nearby at night.
  • One trap per problem area works better than one trap in the middle of the house.

Light traps work best in a dim room, so evenings and overnight are when they catch the most.

How Long Until They Are Gone?

Expect about two to three weeks if you keep at both steps. Adults get trapped within days, but eggs and larvae already in drains or soil keep hatching for a while. Keep traps out and keep the sources dry and clean until you go a full week without seeing new flies.

If they still keep coming back, look for a hidden source: a forgotten potato or onion in the pantry, a damp mop, or a spill under an appliance. For more ideas on keeping a fresh kitchen, see our kitchen essentials checklist.

Quick Answers

Why do I suddenly have so many fruit flies?

They usually come in on fruit from the store and breed fast in overripe produce, drains or trash. One missed source can produce a new wave about every week.

Do fungus gnats hurt plants?

Adults are harmless, but larvae feed on organic matter and sometimes tender roots. Heavy infestations can stress seedlings and young plants.

Are UV light traps safe around pets?

Insecticide-free plug-in traps that use light and a sticky pad are generally considered pet friendly when used as directed. Keep the sticky cartridge out of reach of curious pets.

Does apple cider vinegar work on gnats?

It works best on fruit flies. Fungus gnats are drawn more to damp soil, so pair a vinegar trap with sticky cards and drier soil.