7 Reasons Why Gnats Are In Your Home (Cause And Solutions)

fruit flies on lemon

Let’s face it, no matter how tidy we keep our homes, none of us are immune to gnats. There are many different types of gnat-like creatures that show up uninvited, but the most common are fruit flies or fungus gnats. What is it about our homes that attract gnats in the first place?

Gnats found in the kitchen are most likely fruit flies that are attracted to ripening or fermenting foods. Fungus gnats, however, are attracted to moist places. The best ways to get rid of gnats involve keeping areas dry and keeping foods stored in scentless air tight containers.

If these sound like any of the problems you’re having, read on for some helpful solutions – we’ll get there together!

* This post contains affiliate links.

What Is A Gnat Anyhow?

First, let’s go over just what a gnat is. Essentially, gnats are three types of small winged flies; fruit flies, drain flies, and fungus gnats.

For this article, we’re JUST discussing fruit flies and fungus gnats. However, most of these tips apply to drain flies too and apply to ALL species of flies. We’re just trying to be specific 🙂

Mainly, you’ll find fruit flies near food (usually fresh fruit thats starting to turn.) Fungus gnats are generally in OTHER areas of your home that are damp, such as potted plants, compost or even your drain.

In each section, we’re going to go over WHY these gnat types are in your home and just what you can do to keep these specific flies out!

First up? Fruit flies!

Why Are There Fruit Flies In My Home?

I’m sure you’ve unfortunately woke up just to find some fruit flies buzzing around your fruit. For me, I typically find them around my ever-so ripe bananas.

Sadly, fruit flies love them just as much as I do. So, let’s get rid of them!!

Fruit Flies Enter Your Home Through Screens, Doors, & Cracks

During the warmer months of the year when fruit is growing, fruit fly populations are going gangbusters. Whether or not you live near fruit growers or not, there will likely be a fruit fly population outside your doors.

In many parts of the world, there are many naturally occurring fruits growing in the wild. Who doesn’t love going blackberry picking when the berries are on?

As fruit is growing outside, these pests reproduce rapidly and then follow the scent to your kitchen. Your efforts to eat fresh and maybe even fermented foods often come at the cost of attracting gnats (fruit flies) to your kitchen!

They will enter your home through any crack in a door, a hole through a screen, or an open window. It may sound defeating to know that it will be nearly impossible to keep fruit flies from entering your home, so I offer you this:  

Fruit flies are very common. Nearly anyone who brings even a banana in their home will attract fruit flies. You are not alone!

You can learn more about the scents that fruit flies hate to do place near these open space in hopes to repel them.

Fruit Flies Are Often A Seasonal Problem

Each spring as the fresh strawberries start finding their way to my kitchen, the fruit flies show up as well.  Now trust me, I am not letting those delicious strawberries rot on my countertop, but they do ripen and get sweeter by the day.  The lovely fragrance of ripening fruit will attract pesky gnats.

As the days start getting warmer, fruit fly populations start increasing at a rapid rate. As you can imagine, this can be a real problem for fruit growers!  In fact, according to work published in Area-Wide Control of Insect Pests, Argentina’s citrus-growing regions estimate the gross value of lost production to be USD 37 million annually JUST from fruit flies!

As you can imagine, growing food on a larger scale can lead to larger problems that often require insecticides.

Here is another reason to be supporting your local organic farmers as often as you can. With smaller food scale production, more integrated pest management methods can be employed to combat pests.

An example of this might be farmers installing swallow nests on fence posts.  Swallows are swift flyers and efficient hunters of many flying pests.  

Another example of integrated pest management happens in the garden soil. By adding organic material to the soil (instead of chemical fertilizers and pesticides), the soil will naturally become a healthier ecosystem with natural predators that will eat pests during their different life cycles. 

As the days start getting colder and dip to freezing, most fruit fly problems will go away as well, unless your home has become a haven for breeding!

Taker a look at our guide on what attracts a fruit fly to learn more about what they specifically go after.

Fruit Flies Will Swarm Around Compost

Organic leftovers, waste from vegetables ready for compost. Fruit fly bait

Fruit flies are often seen swarming around ripening bananas, trash cans, and even the drains in the kitchen.  That’s right, all of these places can be considered compost since it is the location where rotting food often ends up!

If you are noticing a swarm of these pesky gnats in the kitchen, it is past time to start planning your strategy to get rid of these creatures.  I’m guessing you won’t have enough spiders in your home to employ an integrated pest management solution! 

To better understand why you have a swarm, you need to know their life cycle and where they’re laying their eggs. Fruit flies lay their eggs on the surface of, or directly beneath, the surface of the fruit. This will also become the food for the larvae before they complete their metamorphosis and become a winged adult.

An Oregon State University Extension Service study discovered that a single female can lay up to 40 eggs a day, and 200-400 eggs in their short 3-5-week adult life span! 

Thats a lot of flies.

With a life cycle like that, we should all stay diligent in our approach to managing this pest in our home!

If you would like to know more, check out our article about keeping gnats away from your compost!

Fruit Flies Thrive In Your Trash Can

The Environmental Protection Agency has reported a 74% increase of Americans who compost food instead of throwing it away in their garbage between the years 2000 and 2018. Those statistics are quite astounding to hear that municipal solid waste systems have been so well used!

For those who are still in the habit of tossing their food scraps in the trash, listen up, because your fruit fly problem will be difficult to solve without taking daily action against it.

If they can find their way past barriers into your home, they will certainly keep returning to your trash can if there is an odor of rotting food.

It is recommended that you change your trash every single day to combat the issue of fruit flies in your trash can. Even with that regular attention, it may not be enough.  

You should also regularly clean the inside of your trash can, especially if there is any type of leakage from your trash bags into the can.

To clean the inside of your trash can, use a mixture of hot water and dish soap with a strong scrubber, such as the Non-Scratch, Super Long-Lasting Scrubbing Pad.  These are multi-purpose and come with a “No-Nonsense Lifetime Satisfaction Guarantee”.

After the inside of the can has been thoroughly cleaned, the next step is to spray the cleaned surface with a 50/50 mix of water and white vinegar solution.  Let sit for about 15 minutes, then wipe off with a clean cloth.

This method should get rid of any eggs or larvae that may have been happily growing in your trash can, and illuminate odors!

For future planning, consider using smaller bags for any food waste, and then tightly seal the bag before adding to your trash can. A tightly sealed lid will also help, but cannot be relied on to keep gnats out of your trash.

Consider placing a bag inside a small bucket with a lid for food waste, such as a used one-gallon ice cream tub; Or dispose of your compost in a composting program!

Fruit Flies Breed In Your Garbage Disposal

Sorry to break it to you, but this modern-day convenience also creates a breeding habitat for fruit flies. They will lay their eggs on the leftover food film that is now fermenting inside the drain. What’s even worse is that fruit flies hardly sleep!

If you’re suspicious of this area and want to be sure if it is a problem, simply cover and secure the garbage disposal drain with a piece of plastic overnight.

If in the morning you take it off and flies come out, then you will have your answer!

How Do I Get Fruit Flies Out Of My Home?

If you’re anything like me, there is always fresh fruit sitting out to enjoy. This means that most mornings I am greeted by a fruit fly.

There are plenty of methods to use to prevent, deter or trap them. Let’s get to the good stuff!

Store Fruit In A Container With A Lid

Use any container with a lid to store your ripening fruit. I like the versatility of these Produce Saver Refrigerator Organizer Bins because of their size and their removable drain tray that keeps produce from sitting in any juices. 

The good thing about putting fruit in the refrigerator is that the cool temperature will stop the fruit from further ripening. Plus, having cool fruit on a hot summer day is quite refreshing!

Replace Ripped Window And Door Screens

Wire window screen, protection from insects

The University of Kentucky’s College of Agriculture recommends replacing all screens to a size no bigger than a tight-fitting 16 mesh screen.  

As such, the DocaScreen Fiberglass Screen Roll can be used for replacing the screen in windows, doors, or patios. It claims to strike the right balance between effective insect protection, sun screening, and visibility.

Their anti-wrinkle fiberglass screen is also much sturdier and easier to work with than aluminum or other metal mesh screens.

Use Insect Traps to Catch Fruit Flies

This is an easy and effective way to trap unwanted fruit flies. Simply put the bait inside a cup, jar, or bowl and cover with either plastic wrap with small holes in it or a paper funnel. Then simply place the container wherever fruit flies are seen.

To make a paper funnel, simply twist a piece of paper to the shape of a funnel, and add some tape to hold it. Be sure the hole isn’t very big, so they’re more likely to get trapped inside and not find their way back out.

Some common baits used are apple cider vinegar, a piece of banana peel, apple peel, strawberry tops, a slice of tomato, etc. You get the idea! Use any form of rotting or fermenting food.

FYI – we LOVE the apple cider vinegar method at my house!

If you’re not a DIY type of person, there are options to purchase pre-made fruit fly traps as well.  BEAPCO Prefilled Fruit Fly Traps are discrete, recyclable, and great to use around the home/ Simply pierce with a pen, and set near the problem areas until full!

Clean Your Garbage Disposal

A simple and effective way to clean your garbage disposal involves two popular household items used in cleaning: baking soda and vinegar! These two mixed causes a chemical reaction that you’ll learn about once you put them together.

Simply sprinkle about a half cup of baking soda into the opening of the garbage disposal then pour about a cup of white vinegar in and let sit for 10 minutes.  

This will cause exciting foaming to occur that is cleaning your disposal for you, and destroying fruit fly habitat. Lastly, run very hot water down the drain as you turn the garbage disposal on to rinse away the mix along with any leftover fruit fly eggs.

Put Away Your Food And Wipe Down Surfaces

It had to be said! The best way to keep fruit flies at bay is to keep a tidy, clean home and promptly put away your food and compost in sealed containers!  

Wipe down countertops, thoroughly clean sinks, and drains, and mop the floor regularly. A little extra attention every day to adding extra shine to your kitchen will help prevent any problems to start with. 

In addition to these methods of getting gnats out of your kitchen, you can also use certain scents to repel them! Read more about 8 Scents That Gnats Hate And How To Use Them.

Next, let’s move out of the kitchen… unless, of course, you keep plants in the kitchen!

Why Are There Fungus Gnats In My Home?

Next up, we have fungus gnats – the only one of these flying “gnats” that are actually called gnats!

If you already know that you have fungus gnats and NOT fruit flies, take a look at our guide on what to do if you find gnats in your home here!

Fungus Gnats Love Your House Plants

Fungus gnats stuck on a yellow sticky trap in a house plant

House plants bring so much color and joy to any home, it makes sense to want to adopt them and bring them home. The unfortunate part is that often these plants become breeding grounds for fungus gnats.

Fungus gnats can be found flying around your house at various times of the year.

You will notice them flying around your house plants because they are likely using their soil for egg-laying habitat.

One great solution is to use coffee grounds to repel gnats as they’re wonderful to add to the soil of your plants too!

Fungus Gnats Live Both Outside And Inside Homes Throughout The Year

Fungus gnats can be found outside in nature and are attracted to moist places.

The larvae of most fungus gnat species feed in the soil on fungus, decaying organic matter, and sometimes even the roots of your plant.  

Similar to the fruit fly, they will silently enter your home through any crack in search of suitable habitat to lay their eggs.

How To Get Rid Of Fungus Gnats In Your Home

If you’ve already fixed screens and cracks in doors and windows, you are ahead of the game! Read on to learn more tips for how to combat fungus gnats.

Don’t Overwater House Plants (They Love Moisture)

This is a good practice regardless of whether or not you have fungus gnats, but a MUST if you have them already.

The soil must go into a drought for a short time to dry out the eggs and larvae.

In combination with this drought period, launch a full-scale eradication of every winged adult you can find. Here is a great use of the Zap IT! Bug Zapper for using it near your porch or plants near your home!

Use Fly Tape To Catch Adult Fungus Gnats

Yes, the infamous fly tape that people hang up. It’s not attractive, but it is undeniably effective. This 20-Pack Sticky Fly Paper Roll is safe to use indoors and has no odor.

Simply hang near your potted plants and the ribbon will do the rest!

Sticky tape for flies. Fly on sticky tape. Insect trap.

Sterile Potting Soil Helps Keep Gnats Away

The purpose of sterile potting soil is that it is prepared to be free of fungus, bacteria, and unwanted insect larvae. Save your best organic gardening methods and soil building for outside!

Inside your house, use sterile potting soil to avoid unwanted problems and pests such as the Miracle-Gro Indoor Potting Mix. This mix is designed to be less prone to gnats and contains no compost or bark, which can attract fungus gnats.

You can also use specific scents that gnats hate near your plants in order to help mask the scent so that the soil doesn’t smell as attractive to them.

Use Diatomaceous Earth

Diatomaceous earth (DE) is made from naturally occurring fossilized diatoms (a type of algae). To insects, it is razor-sharp to their exoskeleton.

If you’re in a real battle with fungus gnats, using DE can help with the egg and larval stages of the fungus gnat’s life cycle.

Essentially, the eggs won’t survive wherever the DE is placed.

It is most effective in treating insect problems when applied to dry soil. Harris Food Grade Diatomaceous Earth comes in an easy to pour bottle.

That’s a Wrap!

I hope this article was helpful and informative in your quest for a gnat-free home!  


Guillén, D., & Sánchez, R. (2007). Expansion of the national fruit fly control programme in Argentina. In Area-wide control of insect pests (pp. 653-660). Springer, Dordrecht.

Houseman, R. M. (2012). Household flies (2012).

Karren, J. B. (1999). Fungus gnats.

How to pest proof your home in under a day e-book by Zack DeAngelis

Download My Free E-Book!

 Take a look at my guide on Pest Proofing Your Home In Under a Day! I get into the nitty-gritty on the most common types of pests you’ll see on your property including BOTH insects and wildlife, along with the specific signs to look for regarding any pest you have questions about.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *