How to Get Rid of Fruit Flies in Your Apartment

Fruit flies in an apartment typically trace back to a single source: fermenting organic material somewhere in your kitchen. A forgotten potato in the pantry, an overripe banana on the counter, or even a sticky residue at the bottom of your trash can is enough to support a full-blown infestation. The good news is that once you find and remove the breeding source, the problem resolves quickly. The tricky part is finding it.

Make Sure They’re Actually Fruit Flies

Fruit flies are tiny, less than 1/8 inch long, with rounded bodies and (usually) red eyes. They hover around fruit bowls, trash cans, and sink drains. If the small flies you’re seeing have long legs and long antennae and seem to come from your houseplants, those are fungus gnats, which breed in wet potting soil. If they’re fuzzy and moth-like, clustering near your bathroom drain, those are drain flies, which breed in the slimy buildup inside pipes. Each requires a different approach, so it’s worth a close look before you start troubleshooting.

There’s also a less common variant called the dark-eyed fruit fly, which has black eyes instead of red. These tend to breed in drains and bathroom areas rather than around fruit, so if you’re seeing small flies primarily in your bathroom, that may be what you’re dealing with.

Why They Multiply So Fast

A single female fruit fly can lay up to 100 eggs per day. At typical room temperature (around 72°F), those eggs hatch within a day. The larvae feed on the yeasts growing in whatever fermenting material they were laid on, then pass through several stages over the next week before forming a pupa. New adults emerge about 11 to 12 days after the eggs were laid, and the cycle starts over immediately. This is why a few stray flies around a banana can become a cloud of dozens within two weeks.

Finding the Breeding Source

Killing adult flies without eliminating where they’re breeding is pointless. You need to find the source. Start with the obvious spots: any fruit or vegetables sitting out on counters. Then check less obvious ones.

  • Trash cans: Even with a liner, liquid from food waste often leaks to the bottom of the can. That wet residue is a prime breeding site.
  • Potatoes and onions: A single rotting potato or onion forgotten at the back of a pantry can breed thousands of fruit flies.
  • Recycling bins: Unrinsed wine bottles, beer cans, or soda containers are extremely attractive to fruit flies.
  • Under the fridge: A fruit juice spill that pooled underneath and was never cleaned up is a common hidden source.
  • Drains and garbage disposals: The organic film that builds up inside kitchen drains provides enough fermenting material for fruit flies to breed in.
  • Mops and cleaning rags: Damp, dirty mops or rags left sitting can harbor eggs and larvae.
  • Open containers: Loose lids on vinegar, wine, beer, or cider bottles are easy entry points.

The key detail to understand is that fruit fly larvae feed on yeasts that grow in decaying, fermenting organic matter. Anything wet and rotting, no matter how small, is a potential nursery. A thin film of spilled juice in a cabinet crack is enough.

Getting Rid of an Active Infestation

Step one is removing every breeding source you can find. Throw out overripe produce or move it to the refrigerator. Scrub the inside of your trash can. Rinse every bottle and can in your recycling. Clean your drains (a stiff brush and hot water work better than just running the disposal). Wipe down counters and check for sticky residue in crevices.

Step two is trapping the remaining adults so they don’t lay more eggs. The simplest trap uses apple cider vinegar in a small bowl or jar with a few drops of dish soap mixed in. The vinegar smells like fermenting fruit, which draws the flies in. The dish soap breaks the surface tension of the liquid so the flies can’t land on it. Instead, they sink and drown. Place traps near wherever you’ve seen the most activity.

You can also make a funnel trap by placing a piece of fruit or a splash of wine in a jar, then rolling a piece of paper into a cone and setting it in the jar’s opening with the narrow end pointing down. Flies enter through the funnel but can’t easily find their way back out. Adding a small amount of yeast to any trap bait increases its attractiveness.

With the breeding source gone and traps in place, you should see a dramatic drop in numbers within a few days. Since the full lifecycle takes about 12 days, give it roughly two weeks for any remaining pupae to emerge and get caught.

Preventing Them From Coming Back

Fruit flies are small enough to pass through standard window screens, so they can enter your apartment from outside. They also hitchhike on produce from the grocery store, arriving as invisible eggs or larvae already laid in or on the fruit. Prevention is really about making sure they have nothing to breed in once they arrive.

Eat, refrigerate, or discard produce as soon as it ripens. If you notice a bruised or damaged spot on a piece of fruit, cut that section away and toss it, since eggs or larvae may already be present in the wound. Keep your trash can clean and take out food waste frequently, which matters even more in a small apartment where the bin is close to your kitchen. Rinse recyclables before they go in the bin, and empty the bin regularly.

If you do any home brewing or canning, make sure all containers are sealed tightly. Fruit flies will lay eggs under a loose lid, and the larvae are small enough to slip through tiny gaps into the container.

In an apartment specifically, one often-overlooked factor is the garbage disposal. Running it regularly and cleaning it with ice, salt, and citrus peels keeps the organic buildup from accumulating. For floor drains in bathrooms or laundry areas, an occasional flush with boiling water helps prevent the moist film that dark-eyed fruit flies favor.

How Long It Takes to Clear Them Out

If you’ve thoroughly cleaned and removed all breeding material, the existing adult flies will die off naturally within a couple of weeks. Traps speed this up considerably by catching adults before they can find a new place to lay eggs. Most people see the population collapse within 3 to 5 days of a thorough cleanout, with stragglers appearing for another week or so as the last pupae hatch. If flies persist beyond two weeks despite your efforts, there’s almost certainly a breeding source you haven’t found yet. Go back to the checklist above and look harder, paying special attention to hidden spots like under appliances, inside drains, or in the back of the pantry.