How to Get Rid of Gnats in Your House: 8 Effective Methods to Try

Ginny Bartolone
Written by Ginny Bartolone
Updated September 9, 2022
Fruit bowl on a counter in kitchen
Photo: Daly and Newton / OJO Images / Getty Images

Don’t let your potted plants fall victim to gnats

Get quotes from up to 3 pros!
Enter a zip below and get matched to top-rated pros near you.

Let’s face it—eliminating household gnats is a tiresome task. You may have tried repeatedly to keep them at bay, but somehow, they keep coming back. Sometimes it takes a few different tries, but with persistence and the right method, you can learn how to get rid of gnats in your house for good. 

What Are Gnats?

Gnats are tiny flying insects that congregate in large numbers. While they are mostly harmless, they are a persistent nuisance that can be difficult to get rid of once they find an attractive source in your home.

The term gnat covers a large collection of small flies, including fungus gnats, fruit flies, midges, drain flies, and even small house flies. Most gnats have long, dangling legs and two thin wings. They are often weak fliers and only grow just over 30 millimeters.

How Do Gnats Enter My House?

Gnats can enter your home from a number of sneaky and more obvious entrances. Fungus gnats are attracted to wet soil in your houseplants, for example. They will either come in through your window or when you transfer your plants indoors for the winter.

Fruit flies can travel inside with ripened fruit from the store, even if the piece of fruit has a small and less-obvious soft spot or opening. Like fungus gnats, fruit flies can also come inside when you open the door, through holes in your screens, and in small cracks in your home's siding.

Drain flies, on the other hand, search for the organic material in your plumbing. They will enter via the basement, drain pipes, or siding of your home.

What Attracts Gnats? 

Gnats are attracted to both moisture and organic materials such as fruit, soil, or decomposing garbage. As we mentioned above, each type of gnat has a preferred diet, such as dirty drains, decomposing fruit, or fungus in your potted plants. 

Because they have a strong sense of smell, gnats hone in on food sources within your home and multiply, creating a larger gnat infestation. Depending on the type of gnat, these flies can lay up to hundreds of eggs in soil, water, or soft fruit. Unsurprisingly, your garbage can make an excellent breeding ground for spreading further.

Gnats are also attracted to other common household items like honey, vinegar, perfumes, or scented candles, so pay close attention to the source of the gnats to find the best solution.

How to Identify a Gnat Infestation

The answer here is simple: Unlike some pest infestations that can hide from sight, you'll know you have gnats almost the instant they arrive. From the kitchen to the bathroom, gnats will congregate around your garbage can, fruit bowl, drains, or potted plants. Left untreated, you could end up with sudden swarms of gnats as they lay more eggs.

How to Get Rid of Gnats in the House

The first step in learning how to get rid of gnats is removing the source of their food. Throw out contaminated food and remove the garbage bag the same day. Be sure your plants have enough drainage so the soil doesn't encourage fungus, and clean your drains of buildup to send the drain flies packing.

Additionally, you'll want to discourage the current tenants further with these seven methods.

1. Apple Cider Vinegar Method

Apple cider vinegar and apples
Photo: jayk7 / Moment / Getty Images

Gnats are attracted to apple cider vinegar’s sweet smell. Use this common pantry item to your advantage by drawing their attention to the scent and then trapping them. 

Here's how to make an ACV gnat trap:

  1. Mix a 1/2 cup of warm water, 2 tablespoons of apple cider vinegar, a spoonful of sugar, and a few drops of dish soap in a bowl. 

  2. Leave the bowl out so the gnats congregate near the sweet smell, but are trapped in the sticky dish soap and can’t get back out.

You can also trap gnats with ACV by covering a container with plastic wrap and punching small holes in the top. Another option is taping a paper cone into the entrance of the container with a small hole at the bottom for gnats to enter but not escape. In the end, each trap design should beckon the gnats to the liquid but keep them from leaving.

2. Diluted Bleach Method

Turning off the sink faucet
Photo: Catherine Falls Commercial / Moment / Getty Images

If you are looking to specifically get rid of drain flies, target your drains and pipes so they have no other attractants in the area. Pour a cap full of bleach down the drain, then rinse it with water. Doing this cleans out the residue in the pipe, while also killing any larvae so they can’t reproduce and multiply. 

Quick safety note: Never pour bleach down your drain just after using other cleaning products. It is also important to check whether bleach is recommended in your septic system.

3. Rotten Fruit Method

Overripe bananas on counter
Photo: Carolin Voelker / Moment / Getty Images

Beat fruit flies at their own game by enticing them with very ripe or rotting produce. Place the trap in any spots where fruit flies typically gather to catch the original swarm. 

Here's what to do:

  1. Put a few pieces of rotten fruit in a bowl.

  2. Cover it with plastic wrap. 

  3. Poke small holes in the plastic so the gnats are lured by the smell and enter the trap through the holes but can’t get back out.

4. Empty Wine or Beer Bottle Method

Wine bottle with corks and corkscrew
Photo: FabrikaCR / iStock / Getty Images Plus / Getty Images

After enjoying a few glasses of wine or your favorite craft beer, save the empty bottle to use as a trap. Leave an inch or two of wine or water at the bottom of the bottle, then pour in a few drops of dish soap. 

The gnats will be enticed by the sweet smell, crawl into the bottle, then fall into the water. The soap will keep the gnats from escaping the water, as will the hard-to-climb neck of the bottle.

5. Candle Method

White lit candlestick
Photo: Touchi Sin / iStock / Getty Images Plus / Getty Images

Secure a tall candlestick in a candle holder. Place the candlestick into a bowl or dish of shallow water and turn off all the lights. The gnats will be drawn to the flame and touch it, causing them to fall into the water. Because this method for getting rid of gnats requires an open flame indoors, be sure not to leave the room until you put the candle out. 

6. Neem Oil Method

If you're trying to deter some pesky fungus gnats on your plants, add a few drops of neem oil to a spray bottle of water. The diluted solution will not harm your plants but will deter any further gnats as the soil dries out.

7. Sticky Trap Method

Yellow sticky trap to get rid of gnats
Photo: Marc Leupold / iStock / Getty Images Plus / Getty Images

If the gnats are resistant to other methods, consider store-bought traps, targeted specifically for the gnat infestation. For example, you can buy specific sticky traps for your houseplants to target fungus gnats.

If you have fruit flies, you can buy hanging sticky traps and put them in areas where they may congregate, such as around fruit bowls or garbage cans. Sticky traps are widely available and easy to clean up, making this a popular first line of defense for some. 

8. Bacillus Thuringiensis (BTI) Method 

If you're on the hunt for a truly natural pesticide—known as a biopesticide—reach for this unique bacterium that happens to be lethal to the larvae of insects like gnats, mosquitoes, and black flies. The spore proteins of BTI kill the young larvae of these insects before they become adults.

There are several products on the market that contain bacillus thuringiensis israelensis (BTI) and come in granular, liquid, oil, and dissolvable pod form. Treat the soil of your indoor houseplants by spraying the concentrated liquid and leaves of the plant to discourage gnat larvae from spreading in the pot. Some brands allow you to shake the granule right in the soil itself.

The National Pesticide Information Center notes that BTI has a very low toxicity to humans, pets, and other animals. However, like all pesticides, it's still smart to wear PPE when handling and potentially breathing in the spore. Also, always follow instructions included with the package, as BTI will come in several different concentrated forms.

How to Prevent Gnats Indoors

Woman cleaning countertops with cleaning spray and cloth
Photo: d3sign / Moment / Getty Images

Now that you know how to get rid of gnats indoors, let’s talk about prevention. Here are a few ways to keep these pests out of your home:

  • Cover your garbage can and take out the trash often, especially when throwing out food.

  • Clean and disinfect your trash can as part of your cleaning routine.

  • Don’t leave out dirty cups and dishes—immediately put them in the dishwasher or wash them when finished.

  • Store fruits and vegetables in the refrigerator (especially in the summer).

  • Clean countertops often, as gnats can find even the smallest spills and crumbs.

  • Frequently change potted plant soil.

  • Avoid overwatering your plants.

  • Keep the humidity rate in your home low to slow the ripening process for various produce.

  • Consider using an outdoor, covered compost bin so you don’t have to dispose of your produce inside.

  • Regularly clean your sink and the inside of your drain using a simple baking soda and water solution.

  • Cover your recycling bin and rinse out cans and other recyclables that may have residue in them. 

  • Patch or replace your window screens when they are damaged.

  • When all else fails, hire a professional pest control company to discover if there’s a larger reason gnats or fruit flies keep returning. 

Get Rid of Gnats on Your Own vs. Professional Pest Control

Figuring out how to get rid of gnats in your home is a straightforward and often successful DIY. You will only spend a few dollars on the soap, apple cider vinegar, or candle—and many homeowners have these in their pantries already.

However, if you're concerned about a large infestation or one that does not respond to these methods, call a local exterminator for surefire solutions. While the average full-service pest control visit can cost between $200 and $600, small treatments for pests like lice, ants, and mosquitoes can cost as low as $50.

Frequently Asked Questions

Always begin by removing the gnat's source of food. Toss rotting fruit, place new fruit in the fridge, and switch the soil of your houseplants. 

The best way to get rid of gnats in the kitchen is by baiting and trapping them with something sweet. Combine water with a few drops of dish soap, apple cider vinegar, and 1 tablespoon of sugar into a bowl. Cover with plastic wrap and poke small holes to trap the gnat in the liquid.

Need professional help with your project?
Get quotes from top-rated pros.