How to Get Rid of Gnats in Your Home and Garden

Find out what causes gnats, how to get rid of them and how to make sure the gnats don't return using a variety of methods.

Price and stock could change after publish date, and we may make money off these affiliate links. Learn more.

Photo by: Lyudmila Mikhailovskaya

Lyudmila Mikhailovskaya

Gnats — small, flying insects that sometimes invade your home and garden — are more than just annoying. They can damage plants and even cause health problems.

What is a Gnat Anyway?

Not all gnats are bad. Some help pollinate plants and eat garden pests. There are four tiny, flying species commonly referred to as gnats:

  • Drain flies. These tiny pests are often found in or around drains, sewers, septic tanks and areas where sewage has leaked.
  • Fruit flies. These gnats are attracted to rotting or fresh fruits and vegetables, moist organic materials and liquids like soft drinks, wine and vinegar.
  • Phorid flies. Like drain flies, phorids hang around garbage, drains and rotting fruits and vegetables.
  • Fungus gnats. These are often found around overwatered houseplants when organic matter in the soil starts to decay. Their larvae feed on plant roots, causing leaves to turn yellow and drop or entire plants to wilt and die. Fungus gnats can also spread a pathogen that causes damping-off, a condition that kills seeds before they sprout and weakens or kills seedlings just after sprouting.
Fungus Gnats On Trap

Yellow Sticky Trap

Control tiny fungus gnats that swarm around potted plants with a sticky yellow trap.

Photo by: Julie Martens Forney

Julie Martens Forney

Control tiny fungus gnats that swarm around potted plants with a sticky yellow trap.

What to Do About Gnats

Gnats won't damage your house, but they can cause other problems. While all gnats bite, not all species have mouth parts that can penetrate the skin. Those that do bite through your skin can transmit pathogens and diseases and cause itching, redness, irritation and swelling. You may need to see a doctor if these symptoms occur.

These tiny insects often swarm around the damp soil in potted plants or fruit that is bruised or over ripe. Most also like sweet and fruity smells and moist, decomposing organic matter. Some species are drawn to sweat, body heat and even the moisture in our eyes.

Bacillus thuringiensis

Fungus Gnat Control

Use a product with Bti, Bacillus thuringiensis israelensis, to kill fungus gnat larvae.

Photo by: Julie Martens Forney

Julie Martens Forney

Use a product with Bti, Bacillus thuringiensis israelensis, to kill fungus gnat larvae.

Gnats often breed in or hang around sinks, toilets, drains, garbage disposals and indoor and outdoor trash cans. Sometimes we accidentally bring them indoors on flowers, houseplants and fresh fruits.

How to Get Rid of Gnats

Gnats reproduce quickly and in large numbers, so you may need to use more than one method to eliminate them. Try natural controls before you reach for pesticides or insecticides

How to Get Rid of Gnats in the House

1. Make a Gnat Trap

Use a small saucer to mix a few tablespoons of apple cider vinegar, a few drops of dishwashing soap and a little sugar. Put the saucer near the gnats. Use more than one saucer, if needed. The gnats will be drawn to the sweet solution, fall in and get trapped. Replace the solution often, until they're gone.

2. Use Flypaper

Hang sticky flypaper ribbons to catch gnats, but be careful where you put them. They'll grab onto almost anything, including your curtains, hair and furniture. Don't use them outdoors, where they'll trap beneficial creatures.

3. Clean Drains

Slowly pour 1/2 cup bleach, diluted with a gallon of water, down your drain. Follow by rinsing the drain with plenty of hot water. You can also use a drain cleaning product labeled for this kind of pest control; follow the directions on the label.

4. Set a Fruit Trap

Put an overripe apple or banana in a bowl covered with plastic wrap. Punch a few holes in the wrap. Gnats that get into the bowl will be trapped so you can dispose of them.

5. Use Leftover Wine

Leave an almost-empty red wine bottle near your kitchen drain. Gnats that crawl inside to reach the alcohol won’t be able to escape.

6. Spray

Use an insecticidal spray made for indoor use.

7. Call a Pro

If gnats keep coming back, or you have a serious infestation, call a professional pest control company for help.

How to Get Rid of Gnats on Houseplants

8. Lure Them to Sticky Cards

Gnats are drawn to the color yellow and can be trapped on special yellow cards covered with a sticky adhesive. For best results, use small cards or cut larger ones into small squares. Lay them on the soil in your potted plants or attach them to twigs or skewers stuck into the pots. Once the traps are full, discard them in an outside trash can.

9. Food-Grade Diatomaceous Earth

DE, as it's known, is an organic, abrasive powder you can buy to sprinkle over the dry soil in your plants. It will trap the gnats until they die from dehydration. Don't apply it when the soil is wet or it won't work. To make sure the DE stays dry, put some sand on top of your potting soil and then apply it. Water your plants from the bottom while using it.

10. Drench the Soil

Bacillus thuringiensis (Bt) is a bacterium that occurs naturally in the soil. Bt var. israelensis (Bti) kills the larvae of fungus gnats. Follow the directions on your product to make a Bti drench and saturate the soil in your potted plants. It will coat the plant roots without harming them and kill fungus gnat larvae that try to feed on them.

11. Let Plants Dry Out Slightly

Let your plants dry out slightly between waterings so any gnat eggs or larvae in the soil will die. If your pots don’t already have drainage holes, make some.

12. Repot

If the gnats keep coming back, repot your plants in clean containers with fresh potting soil.

How to Prevent Gnats

Keep gnats from getting in your home in the first place in by sealing up cracks, holes and crevices in your doors, walls, windows and foundation. Repair or replace window screens with tears or rips.

Put food and beverages away after meals and clean up spills. Don’t leave pet food out and wash pet bowls daily.

Check for leaks from indoor and outdoor plumbing and constantly damp soil around your downspouts or under your gutters. Clean up damp places where gnats like to breed, such as compost piles and leaf piles, and keep birdbaths, fountains and other water features clean.

Use trash cans with tightly fitting lids and remove indoor trash daily. Keep compost piles and outdoor trash containers at least 15 feet away from your house.

Keep fruits and vegetables refrigerated, not on the counter. (Some foods, like bananas, tomatoes and pears, shouldn’t be refrigerated so they can continue to ripen.) Wash fruits and vegetables before putting them away.

How to Get Rid of Gnats Outdoors

Instead of saturating outdoor plants with a Bti drench, drop a mosquito dunk labeled as safe for use around pets and wildlife in a watering can or bucket. Let it sit long enough for the dunk to release its insect-killing bacteria into the water. Pour the water over the soil of your outdoor plants. Do this for several weeks to be sure any gnat larvae in the soil are killed.

Don't use electric pest traps for gnats because they often kill beneficial insects, too. Traps that attract gnats with ultraviolet lights may work, but they only trap the adults, so larvae are left to mature and reproduce.

Some gnats swarm around outdoor lights. To discourage them, switch to yellow "bug lights" or low voltage bulbs, or keep lights near doors and windows turned off.

If you get bitten but can't see what's biting you, the pests may be tiny, biting midges, also called sand gnats and no-see-ums. Avoid them by staying indoors on damp, overcast days when the air is still, or cover up when you're outside. Insect repellants and insect repellant clothing may also help.

Next Up

How to Get Rid of Ants Indoors and Outdoors

Find out what to do when ants cause a problem in your house or outdoors, including natural remedies for ridding your space of these small but mighty pests.

How to Get Rid of Japanese Beetles

Get rid of Japanese beetles with a few of these easy strategies.

How to Get Rid of Fruit Flies

Fruit flies are definitely gross and can lay up to 50 eggs per day. Discover easy ways to kill fruit flies in your home with clever tips and traps.

How to Get Rid of Spider Mites

Spider mites are among the most problematic plant pests, particularly for houseplants. Get tips on identifying damage from spider mites and learn how to get rid of them.

How to Get Rid of Aphids

Find out from the garden experts at HGTV how to identify and get rid of aphids.

13 Ways to Get Rid of Slugs in the Garden

What’s slimy, has a voracious appetite and reproduces like mad? Slugs! Learn what you need to know to get rid of these eating machines.

How to Get Rid of Spiders

Learn how to capture spiders indoors and manage potential infestations with these simple, natural tips.

How to Get Rid of Skunks in Your Garden

Learn how to get rid of skunks while protecting yourself from their best defense.

How to Get Rid of Drain Flies

Give these nasty pests the boot before they take over the kitchen, and keep them away for good

How to Get Rid of Crickets

Chirping crickets can drive you crazy if they get indoors, and they can damage your home. Large numbers of crickets can harm yards and gardens, too. We've got the tips you need to get rid of crickets.

Go Shopping

Get product recommendations from HGTV editors, plus can’t-miss sales and deals.

On TV

Follow Us Everywhere

Join the party! Don't miss HGTV in your favorite social media feeds.