How to Get Rid of Small Flies in the Kitchen

Small flies in the kitchen almost always trace back to a single breeding source, and eliminating that source is the only way to get rid of them for good. Traps and sprays kill adult flies, but new ones hatch every few days until you remove whatever they’re laying eggs in. The fix depends on which fly you’re dealing with, so a quick identification saves you from wasting time on the wrong approach.

Identify Which Fly You Have

Four types of small flies commonly show up in kitchens, and each one breeds in different material. All are roughly 1/8 inch long or smaller, but their behavior and appearance give them away.

Fruit flies are the most common kitchen invader. They have distinctive red eyes and hover around produce, recycling bins, and anything fermented. They’re drawn to the yeasts that grow on ripening or decaying fruit, spilled juice, wine, and beer. If you see tiny flies circling your fruit bowl or garbage can, these are almost certainly the culprit.

Drain flies look fuzzy or moth-like, with broad leaf-shaped wings. They tend to rest on walls near sinks and show up most often in the evening. Their larvae live in the slimy biofilm that builds up inside drain pipes, feeding on bacteria and fungi in that film.

Phorid flies are tan to dark brown with a noticeable hump on their back when seen from the side. The easiest tell is their behavior: instead of flying, they scurry erratically across countertops and surfaces, earning them the nickname “scuttle flies.” They breed in any moist, decaying organic matter, including pet waste, grime under appliances, dirty mop heads, and drain pipe buildup.

Fungus gnats are mosquito-like with long legs and long antennae, but much smaller than mosquitoes. If your kitchen has potted herbs or plants, these are likely breeding in the wet soil. They don’t bite, but they tend to fly around your face and toward screens.

Find the Breeding Source

This is the step most people skip, and it’s the reason the flies keep coming back. Adult flies live only a week or two, but a single female fruit fly can lay eggs in batches of up to 20 at a time in ripening produce. Those eggs hatch in two to four days. If you only set traps without removing the source, you’re fighting an endless cycle.

Start with the obvious spots: fruit bowls, the bottom of your trash can, recycling bins with unwashed containers, and any forgotten produce. Then check less obvious ones. A potato rolling behind a bin, a sticky spill under the fridge, or a damp rag shoved in a corner can sustain a breeding population for weeks. Phorid flies in particular thrive on organic residue trapped between or under appliances.

If you suspect your drains, there’s a simple test. Place a strip of clear tape sticky-side down over the drain opening before bed, or coat the inside of a clear cup with petroleum jelly and set it upside down over the drain. Leave it overnight. If flies are breeding in the pipe, you’ll find adults stuck to the tape or cup by morning. This tells you exactly which drain needs attention.

Clean the Source Thoroughly

For Fruit Flies

Remove all exposed produce. Toss anything overripe or damaged. Rinse remaining fruits and vegetables, then store them in the refrigerator or in sealed containers. Fruit fly eggs are less likely to hatch at temperatures below 75°F, so even refrigerating produce for 24 hours before moving it back to the counter helps kill eggs that may have been laid on the skin at the grocery store.

Clean your trash can, recycling bin, and compost container with hot, soapy water. Rinse all food containers before tossing them. If you compost food scraps, store peels and other matter in a sealed bag in the freezer until trash day. The cold kills eggs and prevents the scraps from becoming a breeding site.

Wipe down countertops, clean under appliances where spills may have pooled, and check the tracks of sliding doors or windows where moisture and debris collect.

For Drain Flies and Phorid Flies

Pouring bleach or boiling water down the drain provides only temporary relief. The temperature drops quickly as water moves through the pipe, and it contacts only a fraction of the biofilm surface. The larvae deeper in the system survive.

The most effective approach is mechanical cleaning. Use a stiff drain brush to physically scrub the inside of the drain body, breaking up the biofilm where larvae live. Follow this with hot, soapy water flushed through the pipe. Enzyme-based drain cleaners can help break down organic buildup over time, but they work slowly and rarely eliminate the full biofilm layer in a single treatment. Plan on repeated cleaning.

For drain flies specifically, you need to maintain this cleaning routine for at least three weeks to break their life cycle. Larvae already in the pipe will continue maturing, so consistent cleaning prevents the next generation from establishing.

For Fungus Gnats

Let the top inch or two of soil in potted plants dry out completely between waterings. The larvae need moist soil to survive. If the infestation is heavy, repotting with fresh, dry soil is faster than waiting.

Trap the Remaining Adults

Once you’ve eliminated the breeding source, traps mop up the adults already flying around. This speeds up the process considerably, since fruit flies can develop from egg to adult in as little as seven days during warm weather (and up to four or five weeks under cooler conditions). You want to catch every adult before it finds a new place to lay eggs.

The simplest and most effective DIY trap uses apple cider vinegar and dish soap. Pour about a quarter cup of apple cider vinegar into a jar, add a few drops of liquid dish soap, and either cover the jar with plastic wrap poked with small holes or simply leave it open. The vinegar’s fermented smell attracts fruit flies. The dish soap breaks the surface tension of the liquid so that flies landing on it sink and drown instead of standing on the surface.

Place traps near the areas where you’ve seen the most activity. A trap by the sink, one near the trash can, and one on the counter covers most kitchens. Check and refresh them every few days.

For drain flies and fungus gnats, sticky traps work better than vinegar. Yellow sticky cards placed near drains or on the soil surface of potted plants catch adults passively. These flies aren’t strongly attracted to vinegar the way fruit flies are.

Timeline for a Fly-Free Kitchen

If you remove the breeding source and set traps on the same day, you should see a dramatic drop in fly numbers within three to five days. The remaining adults get caught in traps or die naturally within a week or two. But eggs and larvae already developing in hidden spots can produce a smaller second wave about a week later.

Give it a full two to three weeks before you consider the problem solved. If flies persist beyond that, you’ve missed a breeding source. Go back to the identification and inspection steps, paying special attention to hidden organic material under appliances, inside drain pipes, or in a forgotten bag of potatoes.

Keeping Them From Coming Back

Fruit flies enter kitchens two ways: they fly in through open windows and doors, or they arrive as invisible eggs already on produce from the store. You can’t prevent every entry, but you can make your kitchen inhospitable.

Store all produce in the refrigerator or in sealed containers. Rinsing and drying fruits and vegetables as soon as you bring them home removes eggs before they have a chance to hatch. Take out kitchen trash regularly, and don’t let recycling bins with residue sit inside. A clean garbage disposal matters too. Food residue inside drains and disposals is one of the most overlooked attractants. Running hot, soapy water through the disposal after each use takes seconds and eliminates the buildup flies need.

Keep recycling bins in the garage or outside if possible. Wipe down the inside of your trash can between bag changes. These small habits remove the moist, decaying organic material that every species of small kitchen fly depends on to reproduce.