Interior Pests

How to Get Rid of Gnats, Indoors and Out

Are gnats plaguing your houseplants and living areas? Try these DIY remedies for how to get rid of gnats fast—and naturally—to eradicate them for good.
Gretchen Heber Avatar
Swarm of gnats.

We may earn revenue from the products available on this page and participate in affiliate programs. Learn More ›

Whether they’re hovering by the hundreds around your fruit bowl, clouding your vegetable garden, or swarming your face—attracted to moisture and salt—gnats are unwelcome visitors. Some bite humans and pets; some can even destroy plants. Fortunately, there are numerous remedies available to rid your home and yard of gnats.

What are gnats?

Gnats are any of several species of small flies that swarm in great numbers. Kyle Morgan, owner of Care Pest Pros in Spicewood, Texas, says the bugs are mainly a problem outdoors in spring and summer, but they’ll hang out indoors all year round. Not only are these “clouds” of gnats generally annoying, some species also bite humans and pets. Some gnats lay their eggs in soil, where the larvae can damage plant roots.

The good news is that adult gnats live for only about a week. The bad news is that they can lay about 200 to 300 eggs during their brief lives. Females lay eggs in damp material. Each egg matures into a larva, and then transitions into a pupa and adult. Depending on the species, a gnat’s entire life cycle can be completed in as few as 3 weeks.

Gnats are highly unlikely to go away without intervention, says Morgan, which is why it’s important to know how to get rid of gnats.

Types of Gnats

How to Get Rid of Gnats in the House
Photo: via Martin Cooper

A number of species of flies fall into the general category of “gnat.” All species are about ⅛ inch long, and these are among the most common:

  • Fruit flies have big red eyes; their oval bodies can be tan or black.
  • Drain flies are typically light gray or tan, and have a moth-like appearance.
  • Fungus gnats are dark gray or black and have an elongated body that resembles a mosquito’s body.
  • Phorid flies are sometimes lumped in with gnats. They can be black, brown, yellow, or a combination of these. They are distinguished by a hump on their thorax.

Why do I have gnats?

Gnats are attracted to salt and moisture, but more specifically to produce, fresh flowers, houseplants, spilled food, and overflowing garbage cans. You may have unknowingly brought home a plant from a garden center that was infested with gnats—or brought freshly picked produce infested with gnats indoors.

How to Get Rid of Gnats in the House

“Cleaning is the number one thing you can do to get rid of gnats,” says Morgan. “Thoroughly clean and dry areas where gnats congregate.” These areas include kitchens, bathrooms—anywhere there’s moisture or food.

Read on to learn about several additional methods that will help you get rid of gnats indoors.

1. Make a gnat trap with apple cider vinegar.

Small bowl of apple cider vinegar with trapped bugs.

There are many home remedies for gnats. For a gnat trap featuring apple cider vinegar, mix together:

  • ½ cup warm water
  • 2 tablespoons apple cider vinegar
  • 1 tablespoon sugar
  • 6 drops dishwashing liquid

Place a bowl containing this solution in an area where you’ve seen gnats. They will be lured in by the fruity-sugary mixture, and the sticky dish soap will trap them. Morgan says he uses a mason jar for his cider vinegar traps.

2. Clean drains with diluted bleach.

Pouring cleaner down kitchen sink drain.

Some types of moisture-seeking gnats tend to congregate around sink or tub drains. To combat these drain flies, mix ½ cup bleach into a gallon of water and slowly pour the mixture into the drain. Be sure to ventilate the room when using bleach.

3. Make a fruit trap.

Mash overripe bananas or other fruit in a bowl. Cover the bowl with plastic wrap and secure it with a rubber band. Using a toothpick, poke holes in the plastic. Gnats will find their way inside the bowl to get at the fruit, but will be unable to escape.

4. Spray them with vinegar.

Person puff of spray from non-aerosol spray bottle against a black background.

If you’ve heard that how to get rid of gnats with white vinegar? Make a spray with equal parts white vinegar and water, and add a couple of drops of dish soap. Spray into clouds of gnats.

5. Use commercial sticky traps.

Gnats on yellow sticky trap.

Consider using sticky traps to get rid of gnats. Place these tacky traps—paper, strips, cards, or ribbons—in areas where gnats and flies congregate. (Some home gardeners find gnats around indoor seed-starting trays, and hang sticky traps nearby.)

RELATED: Buyer’s Guide: The Best Gnat Traps

6. Leave out leftover wine.

Pour wine that’s past its prime into a small dish; add a couple of drops of dish soap. Gnats will flock to the “open bar” and get stuck in the mire.

7. Light a candle.

Lit purple candle burned almost to the wick in a small wood bowl filled with water.

This method works best after dark: Fill a pan with water, and add a few drops of dish soap. Stand a tall taper candle in the middle. Gnats will do an Icarus, flying too close to the “sun” and perishing. Obviously, you’ll want to keep close watch on the lit candle.

8. Buy a bug zapper.

Numerous bug zappers are available for indoor and outdoor use, many of which were tested in our tested guide to the best bug zappers. Choose one that’s maybe a bit smaller and less obtrusive than others, and pick one that is suitable for indoor use, like our top indoor pick from Aspectek.

9. Sprinkle diatomaceous earth in your houseplant pots.

Small hand spade with diatomaceous earth.

For gnat problems on and around your houseplants, consider using diatomaceous earth. Sprinkle the fine powder in a thin layer on the soil; it will work to kill gnat larvae. You can also apply a fine dust of diatomaceous earth to plants’ leaves, though you may want to do this outside, as the powder is quite messy and its particles can be irritating or harmful if inhaled.

10. Avoid overwatering plants.

Woman bottom watering plans in bathtub.

Gnats like moist conditions, and wet soil is a welcome mat. They’ll be happy to lay their eggs in your moist houseplant soil. Consider bottom watering houseplants so the soil on top remains fairly dry.

RELATED: What Is “Bottom Watering,” Anyway?

11. Top your potted plant soil with natural ingredients.

Coffee grounds on spoon over plant.

Sprinkle a layer of thoroughly dried-out coffee grounds over the soil of your container plants. You can also sprinkle baking soda over the soil; gnat larvae will absorb these materials and die.

12. Repot houseplants into fresh soil.

Woman repotting houseplant.

If you suspect your houseplants’ soil is rife with gnat larvae, you may have to repot the plant. Trash the old soil, and wash the plant’s roots as best you can. Thoroughly clean out the container, and replant your greenery in fresh soil.

How to Get Rid of Gnats Outdoors

Three lit citronella torches with bamboo bases.

Gnats can be a problem outside, too. If you’re looking for tips on how to get rid of gnats in plants and other outdoor locations, many of the above methods—things like not overwatering, and using DIY gnat traps, zappers, and sticky traps—can also work outdoors. Outside, you should also:

  • Allow your lawn and flower beds to dry out between waterings.
  • Make sure your hose connections aren’t leaking.
  • Hang flypaper in areas where gnats congregate.
  • Keep vegetable gardens tidy by immediately picking up any fallen fruit or vegetables.
  • If you’re hosting an outdoor gathering, place citronella torches around the space.

When to Call Pest Control

Morgan says if you’ve exhausted all the home remedies and just can’t eradicate the gnats, it might be time to call in the pros. “We get called when homeowners can’t find the source of the bugs,” he says. Likewise, he says the source of the bugs might be unreachable, which could indicate it’s time to call in the pros. “We may even have to open up a wall,” he says.

There are various commercial products exterminators can use, he says, depending on the situation. And while every infestation is unique, Morgan explains, “A one-time service for gnats will probably start around $150.”

How to Prevent Gnats

Person putting the lid on a white kitchen compost bin filled with food scraps.

Follow these recommendations to prevent an gnat infestation from taking hold in your home:

  • Take out trash regularly and make sure your kitchen trash bin in particular is sealed when it’s not in use. The same goes for countertop compost bins.
  • Keep humidity low in your home.
  • Finish or freeze fruit before they over-ripen.
  • Immediately clean any spills in your kitchen, especially if the food or drink has sugar in it.
  • Clean drains and garbage disposal regularly.
  • Seal holes in doors, walls, and windows.
  • Regularly wash pet bowls.
  • Don’t overwater houseplants.
  • Fix plumbing issues immediately.
  • Outside, keeps gardens clear of fallen fruits and vegetables.

The mere presence of these pesky insects in your house can leave you feeling twitchy. Take steps to prevent an infestation, and act quickly if the invaders set up shop in your home and garden.