How to get rid of gnats – 11 tricks to banish them from your house and yard

It's the time of year when you need to find out how to get rid of gnats in the house. These easy tips will help you have a bite-free summer

Gnat
(Image credit: Alamy)

If you want to get rid of gnats, whether in your house or around the backyard, it's likely you're being pestered and bitten by these pesky flies.

A gnat isn't one particular insect species, but it's the name we use to encompass drain flies, fungus gnats, fruit flies and midges in general. Not all bite, though all are annoying to have floating around you in your home and backyard.

There are distinct reasons why gnats can be found in your home, and plenty of ways to be rid of them. Just like when you get rid of fruit flies, many of the tricks and hacks are easy home remedies, too.

So, if you are wondering how to get rid of gnats, why they're in your home in the first place, and how to stop them coming back in in future, we have all the tips and advice you need.

How to get rid of gnats

From setting traps to good housekeeping and using cleaning tips, there are many ways to get rid of gnats. Here, we take you through the top 11 to try. Do them all, and your gnat problem will diminish dramatically.

1. With sticky traps

If you have noticed a sudden influx of gnats and they've never been a problem before, or if they're a regular problem that good housekeeping doesn't seem to sort, the most effortless way to get rid of them – or kill them – is to invest in a few sticky traps designed for the job. 

You simply place these where gnats have been seen; the gnats are attracted to the traps and stick to them, where they will die. Garsum Yellow Sticky Traps (opens in new tab) are the most highly rated on Amazon. 

2. With apple cider vinegar

Cleaning with vinegar is a well-known home remedy, but did you know it can be used to get rid of gnats too? Simply combine half a cup of apple cider vinegar with a cup of warm water and a few drops of dish soap into a pretty bowl or cup. Put the bowl/cup where the gnats tend to congregate. They will be attracted by the sweet smell and the chance of a drink. As they reach in to sip the solution, the dish soap traps them and they drown. 

3. With overripe fruit

We've talked in our gardening pages of 'trap plants' and how they are used to attract pests (or predators of pests) so that your main crops can survive until harvest. Putting out overripe fruit performs exactly the same function.

Simply put some cut up, overripe fruit in a bowl or cup, cover it with saran wrap and poke tiny holes through the wrap. Once inside the bowl or cup, they will find it difficult to get up and out. When there's a critical mass of them inside, you can dispose of the whole lot into the garbage.

4. With red wine

Just as gnats are attracted to the smell of apple cider vinegar and rotting fruit, they love the smell of red wine. Mix half a cup of red wine with a few drops of dish soap in a cup or bowl, or leave the dregs of an old bottle of red wine, add some dish soap, and put where the gnats are a problem. The gnats will find their way in easily enough, but are unlikely to emerge.

5. By opening (and closing) windows

Ironically, both opening and closing windows will solve your gnat problem. If the gnats are finding their way indoors from your yard (perhaps they've found a drain they particularly love and it's near an open window), shutting or fitting a fly screen will help. 

If, however, gnats have gathered in a room and it's windy outdoors, opening up windows to create a breeze indoors will discourage them from hanging about. They are not great flyers and tend to dislike rooms with good air movement.

6. By cleaning drains

Gnats love wet environments, in fact, they love them so much, they will even lay their eggs in them. So if you have a constantly wet drain in or outdoors, it's likely that it will attract drain flies. Keeping these drains super-clean and as dry as possible indoors and out will help reduce the chance of gnats being attracted to them. 

7. With chemicals

Keeping drains clean, whether in your kitchen sink, bathtub, shower or backyard, will help discourage and get rid of gnats. 

Simply empty half a cup of bleach down a drain where you have seen gnats and you will wipe out any larvae or adults hiding there. 

8. With good housekeeping

The best way to get rid of gnats is to prevent them from coming into your house in the first place. As we said above, having doors and windows open will encourage them in, but so will a number of untended household chores. So if you have a gnat problem, look to:

  • Empty the trash can regularly;
  • Wipe up spills as they happen;
  • Wash dishes or put them straight in the dishwasher and close the door;
  • Put garbage bags into a lidded garbage can;
  • Wash fruit and vegetables and leave them to dry thoroughly when you come home from the store; 
  • Store fruit and veg in a sealed pantry or refrigerator.
  • Keep leftovers sealed away, too.
  • Ensure your compost is covered.
  • Keep drains clean and dry.

9. By sealing the garbage can

Indoors or out, a garbage can with a good seal on the lid will get rid of gnats and discourage all sorts of other pests, too. This doesn't just go for garbage cans that have discarded food in them, but any trash that's moist, which you will find for sure in your bathroom. 

10. By not overwatering plants

You may have noticed that there are a lot of gnats around your indoor plants. This is often because plant soil is moist, which can be a breeding ground for gnats. If you want to get rid of gnats in plants, these are probably fungus gnats, and you'll want to allow your plants' soil to dry out between watering to create a less hospitable home for them. 

'Fungus gnats or sciarid flies love damp soil so the more you water your plants the more they will be attracted,' says John Stewart, from the technical team at eco-friendly pest control brand Green Protect (opens in new tab). 'They normally feed on decaying organic material but when found in our homes, they are a real nuisance. To prevent and control this species of fly, do not overwater your plants. You can easily monitor for the presence of these pests with yellow sticky traps. There are simple water level indicators or monitors that can be bought from garden centers to ensure that plants are not over or underwatered.

'However, if the flies are established, the larvae can be killed with biological control using nematode worms. The worms will seek and destroy the maggots, and they are safe to use around humans and pets.'

Using cinnamon in soil is also said to get rid of gnats in the house. 

11. Keep your home cool and dry

Gnats love a warm, humid atmosphere, so if your home is particularly damp or humid, they will be more attracted to it, or to particular rooms in it. The best way to keep rooms cool and dry is to crack open windows (combined with fly screens if there's a gnat problem outdoors), to check for and fix leaks or damp, and to consider investing in a dehumidifier in a room that's regularly humid, such as a laundry room

What causes lots of gnats in the house?

Gnats are attracted by:

Warm, humid atmospheres, which you can fix by checking for leaks and damp, airing spaces and investing in a dehumidifier. 

Poor housekeeping: wiping up spills, draining standing water, keeping drains clean, sealing garbage cans and putting away uneaten food, fruit and veg will help deter them. 

Overwatered plants: you'll notice them when you water plants, as they will suddenly appear from the soil in a plume. Allowing soil to dry out completely between watering will make soil less attractive to them.

Are gnats harmful?

Most gnats are not harmful to humans, though some can give you bites a little like mosquito bites. Fungus gnats are those that love your houseplants; in large numbers they can damage plants' roots and growth. Fruit flies are attracted to rotten fruit but love any sweet liquids, such as vinegar and red win. Drain flies can be found buzzing around your home's drains, while midges are more likely to gather around standing water, such as your backyard's water features.

What is the quickest way to get rid of gnats?

If you have any apple cider vinegar or red wine in the kitchen, mixing half a cup of either with a few drops of dish soap and putting it where gnats are a nuisance will quickly attract them. They will be lured by the sweet smell into the solution and trapped by the sticky dish soap. 

Is there a spray for gnats?

Homemade bug sprays can be just as effective as shop-bought, chemical sprays. Mixing half a cup of isopropyl alcohol with a teaspoon of dish soap in a spray bottle, and spritzing it directly on to the gnats will quickly kill the gnats.

Where do gnats lay eggs?

Gnats lay their eggs in the places they love to feed and hide, namely, dirty garbage disposals and drains, compost bins, garbage cans and anywhere moist and humid. They will also lay eggs into rotting fruit and vegetables, including those in your fruit bowl or pantry.

Will gnats go away on their own?

No, gnats will not go away on their own if they are happy in their new-found home. The best way to encourage them to 'go away' is to create traps for them to lure them away from where they are in your home now, and to thoroughly clean the areas they are attracted to, such as drains, garbage cans, rotted fruit, wet plant soil, and so on.

Lucy Searle
Lucy Searle

Lucy Searle has written about interiors, property and gardens since 1990, working her way around the interiors departments of women's magazines before switching to interiors-only titles in the mid-nineties. She was Associate Editor on Ideal Home, and Launch Editor of 4Homes magazine, before moving into digital in 2007, launching Channel 4's flagship website, Channel4.com/4homes. In 2018, Lucy took on the role of Global Editor in Chief for Realhomes.com, taking the site from a small magazine add-on to a global success. She was asked to repeat that success at Homes & Gardens, where she has also taken on the editorship of the magazine.