
With warm weather comes a noticeable increase in gnat activity, both inside and outside the home. Fortunately, learning how to get rid of gnats is a simple task that requires just a few supplies. This guide will teach you how to get rid of gnats outside, in your house, in your plants and prevent them from returning.
What Attracts Gnats?

Gnats become a nuisance when they start to swarm around something that attracts them. They are primarily attracted to sweet and fruity scents, but many species of gnats are also drawn to water and body heat, which is why they tend to fly around both people and pets. Perspiration and even the moisture of your eyes and nose can draw in gnats.
Fruits, vegetables and flowers growing in your garden can also appeal to gnats. Harvesting produce regularly and clearing away overripe produce and organic waste can help keep the natural gnat population low. Additionally, avoid overwatering your lawn and garden, as doing so can promote the growth of fungus that serves as the primary food source of certain gnat species.
Inside the home, gnats can be attracted to unsealed produce, fresh flowers, houseplants, food spillage and open or overflowing garbage cans. Gnats may also live in sink drains where food residue can collect. Dirty kitchen sink drains can provide food, water, shelter and breeding sites to many fly species.
Adult female gnats can lay up to 300 eggs in their short, 10-day lifespan, so it is important to find a complete solution for how to get rid of gnats in your house. Getting rid of gnats completely and for the long-term will likely require multiple treatments and preventative measures.
How Do You Get Rid of Gnats?

When getting rid of gnats, you may have to treat the problem both inside and outside your home. The best way to get rid of gnats is to find a combination of solutions that address both indoor and outdoor gnat infestations.
How to Get Rid of Gnats in Your House
- Identify and remove the source of the infestation. The source may be rotting produce, old food spillage in a sink or a trash can, a houseplant or anything else that creates a good food source and breeding site for gnats.
- Purchase a gnat trap or gnat zapper or create a DIY gnat trap to catch and kill the gnats in the house.
- Use a gnat spray to kill gnats in flight or to spray down areas of infestation.
How to Get Rid of Gnats Outside
- Identify and remove potential source of infestations. The source of outdoor gnat infestations may be harder to identify than indoor sources, but you can begin by bagging and removing leaf and clipping piles, relocating compost bins and drain standing water spots if possible.
- Allow the lawn and garden beds to dry more thoroughly between waterings.
- Hang gnat traps in areas you notice gnat swarms and change the fly paper frequently.
- Electric or flame torches can help repel gnats and other insects from your outdoor spaces.
- Use outdoor gnat spray or DIY gnat spray on plants that attract gnats.
What Are Home Remedies for Getting Rid of Gnats?

Gnats are one of the few pests that can also be effectively treated using home remedies. Home remedies for getting rid of gnats can be used for both indoor and outdoor infestations, as well as alongside other gnat treatment options.
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 and add a few drops of dish soap. The vinegar will attract the gnats, while the dish soap makes the mixture too viscous for them to escape.
- Seal the jar and place it in the area of the highest gnat concentration.
- Check the trap every few days and discard the contents once it starts to fill with dead gnats.
- Thoroughly wash the jar with soap and hot water, then refill and repeat until the gnat problem is treated.
- Place multiple vinegar traps in discrete locations outside to deal with garden gnat infestations.
Wine Trap
- Fill a small container, such as a short glass or baby food jar, three-quarters full of red wine and add a few drops of dish soap.
- Place the open container in the area of the highest gnat concentration.
- Check the trap daily and discard the contents as needed once it starts to fill with dead gnats.
- Thoroughly wash the container with soap and hot water, then refill and repeat until the gnat problem is treated.
Candle Trap
- Place a candle upright in a bowl or on a tray in the room with the most gnats.
- Pour a shallow pool of water into the bowl or tray.
- Add a few drops of dish soap to the water.
- In the evening, light the candle and turn off all the other lights in the room. The gnats will be attracted to the light and either burn in the candle flame or fly into the flame’s reflection in the water and drown.
- Never leave the candle lit overnight or unattended around pets and children.
Drain Treatment
- When the gnats are infesting your drains, combine one of the above DIY traps with a drain treatment that eliminates the gnats at their source.
- Pour 1/2-cup of salt and 1/2-cup of baking soda down the drain.
- Next pour 1-cup of white vinegar down the drain.
- Allow the mixture to foam and remain in the drain for at least two hours.
- Rinse the sink and drain with plenty of hot water. As a result, the drain will be clean and all gnats, as well as their larvae and eggs, will be killed.
How Do You Get Rid of Gnats in Houseplants?

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.
How Do You Prevent Gnats?

Take preventative steps to help support the effectiveness of your selected treatment methods and to keep swarms of gnats away for good.
- 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 diluted bleach solution to repel mold.
- Keep food covered or sealed in containers and store produce in the refrigerator rather than on counters and 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 spills from sweet liquids.
- Clean out and dry your sink frequently, especially in the evening. Keep a stopper in the sink drain when not in use.
- 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.
- Cover and relocate compost bins and outdoor trash bins to at least 15-feet away from the home. If needed, consider introducing beneficial nematodes to the compost pile to help fend off insects.
- Install sodium bulbs in outdoor lighting fixtures to limit the attraction for gnats.
- Regularly clean birdbaths and water features and change the water often.
Gnats can be difficult to control, but a combination of store-bought treatments, DIY treatments and preventative actions can eliminate troublesome gnat infestations. Whichever methods you choose, you can find the supplies you need to get rid of gnats using The Home Depot app. Search by voice or image and let our app find products for you.
Explore More on homedepot.com
Appliances
Lumber & Composites
More Products
- Buy BEYOND BRIGHT 7.5 in. x 4.25 in. 6000 Lumens Single Pole Occupancy LED Flush Mount Motion Activated Garage Light BEBRPRO
- Hampton Bay Stetson 11 in. Transitional Brushed Nickel 5 CCT Integrated LED Flush Mount with Frosted Clear Glass Shade for Kitchen HB1022C
- Buy Klean-Strip Green 1 Gal. Floor Adhesive Remover
- Buy Kitchen Details 3-Tier Can Storage Organizer Rack 24199