Buying Guide

How to Get Rid of Gnats


Gnats are one of the few household insects that seem to be thwarted equally well by homemade products as by mass-produced gnat traps and gnat sprays

  • Vinegar trap. Use an awl or a sharp nail to poke several small holes in the lid of a large mason jar. Fill the jar half-full of apple cider vinegar, then seal the jar. Place the jar in the area of the heaviest gnat concentration. Check the trap every few days and when it starts to fill with gnats, take the trap outside and either discard the whole jar or open the jar, pour the contents into a plastic bag and seal it. Discard the bag, then thoroughly wash the jar trap in hot, soapy water. Refill and replace the jar. Repeat as needed until the gnats are gone. 
  • Wine trap. Fill a small container, such as a short glass or baby food jar, three-quarters full of red wine. Gently mix in two drops of lemon-scented dish soap. Leave the trap open on the counter where the gnats will land on the wine surface, get trapped by the soap and drown. Discard the wine as above and refresh the trap every few days. 

Gnat spray can be applied to areas of infestation but can also be sprayed on the gnats in flight. Most gnat sprays kill gnats instantly, but be sure to read labels on all products and follow manufacturer instructions. Sticky paper traps can also be effective, and they have the benefit of being cost-effective. However, they usually take longer to work and in the case of a large gnat infestation must be combined with other treatments.


The most prevalent species of gnats that swarm outside the home are fungus gnats, but any moist conditions can encourage many varieties of gnats to settle into your property. This increases the chances that the swarm will eventually find its way indoors, so it is imperative to eliminate outdoor gnat populations. 

  • Deploy gnat traps in areas where you notice high concentrations of gnats. In addition to sticky traps, most electronic insect repellents also work to drive off gnats along with other flying insects. 
  • Create larger versions of the household vinegar trap and place them throughout the garden, especially near water features. 
  • Apply liquid insecticide formulated for flying insects around the perimeter of your property, including the outside of the home, along the foundation and at entry points where pipes and utilities enter the house. 
  • Install sodium bulbs in outdoor lighting fixtures to limit the attraction for gnats. 
  • Amend your garden soil to improve drainage and consider topping areas that remain damp with a layer of sand. A 1-inch layer will deter gnats looking for wet areas to lay their eggs. 
  • Avoid overwatering your lawn and turn over mulch regularly to give the underlying layer exposure to sun and air so it can dry. 
  • Regularly clean birdbaths and water features, and change the water often. 
  • Keep your compost pile and trash cans at least 15 feet from your home. Keep cans covered and maintain your compost to keep gnats and other insects at bay. If needed, consider introducing beneficial nematodes to the compost pile to help fend off insects.

Because of their small size, gnats can seem simply annoying rather than harmful. However, gnat swarms can pose problems for people with breathing issues, while some types of the insect are blood feeders and can bite people and pets. Some types of gnats are even known to spread diseases. 

You should take a number of preventative steps to help support the effectiveness of your selected treatment methods. 

  • Seal cracks and small openings around windows and doors inside and out, as well as your home’s foundation. The smallest gap can provide an entry point for gnats. 
  • Ensure screens are in good condition and repair or replace any screens that have gaps or tears. 
  • Promptly repair leaks around sinks and interior pipes and dry up any areas where water may have accumulated. Wipe areas with a bleach solution to repel mold. 
  • Keep food covered or sealed in containers and store produce in the refrigerator rather than on counters in open bowls.
  • Keep pet dishes clean and do not leave pet food or water out overnight. When feeding wet food, add only the amount of food to your pet’s dish that it will finish in one sitting to keep leftovers from attracting gnats. 
  • Keep countertops and floors clean and wipe up spills as soon as they happen, especially sweet liquids. 
  • Clean out and dry your sink after use, especially in the evening. Keep a stopper in the sink drain when not in use. 
  • Keep the inside of drains cleaned to prevent gnats from nesting there. Sprinkle two tablespoons of baking soda into the drain, then pour in a cup of white vinegar. Let this mixture sit for about two hours before running water through the drain. 
  • Periodically scrub inside the drain with a narrow, long-handled cleaning brush. Removing the organic matter that clings to the sides of the drain helps break the gnat lifecycle since it leaves nothing for their larvae to feed on. 
  • Take trash out daily and keep trash bins away from entry points to the home.

There are some species of gnats that prefer to infest houseplants. It is possible to apply pest control methods that eliminate the gnats without damaging your indoor plant collection. 

  • Mix one tablespoon of lemon-scented dish soap with two liters of water. Pour into a spray bottle. 
  • Spray the infested houseplant liberally with the soap mixture; be sure to coat the soil, stem and leaves thoroughly. This will kill off any adult gnats on the plant or in the pot. 
  • Leave the mixture on the plant for one to two hours, then spray the plant with plain water to rinse off the soap. 
  • Allow the plant soil to dry out. Do not water the infested plant again until the top two inches of soil have dried completely. Any larvae or eggs the adult gnat has deposited will die under these conditions. The plant may wilt slightly, but it should recover once you resume watering. 
  • If the gnats persist, gently repot the affected plant with fresh soil and a new planter. Dispose of the old soil and planter and place in an outdoor trash container.

Ready to find the supplies you need in your local store? Use The Home Depot app to locate products and check inventory. We'll take you to the exact aisle and bay. Need it fast? Order before noon for convenient scheduled same-day delivery.