Pests › Flies and gnats
How to get rid of gnats in the house
How to get rid of gnats in the house starts with knowing which small fly you have. Fungus gnats, fruit flies and drain flies each breed somewhere different, and finding that spot is the lasting fix: sprays and fogs may give only temporary relief, Texas A&M AgriLife Extension says.

Why do I have gnats in my house?
The small flies found in houses include drain flies, fruit flies, phorid flies and fungus gnats. Fruit flies are small enough to pass through window screens and come in through open doors and windows. They're most common in summer, though Missouri Extension says they become more of an indoor nuisance in the fall, when they come in to escape the cooler weather.
Fungus gnats indoors usually trace back to wet soil in potted plants or moisture from leaks in walls and ceilings.
How to get rid of gnats in plants
Fungus gnat larvae live in moist potting soil, where they feed on plant roots or on the fungi growing in the soil. The only way to get rid of fungus gnats is to find and remove where they're breeding, Texas A&M says.
Let the soil dry out and fix any leaks. Infestations are most common in winter, when plants tend to be overwatered, and moving the pots outdoors can clear them. Now and then a bag of potting soil arrives already infested.
How to get rid of gnats in the kitchen
In the kitchen, the small flies are usually fruit flies. Throw out overripe fruit or keep it in the refrigerator, and seal the recycling bins. Our webpage on how to get rid of fruit flies covers the places they breed that are easy to miss.
How to get rid of drain flies in the bathroom
If small flies keep showing up in a bathroom, they're probably coming from the sink, tub or shower drains, a broken wax seal under the toilet, or larvae breeding in moisture and organic matter that's built up somewhere. Other spots to check are overflow holes in sinks and tubs and leaking pipes behind a wall.
Scrubbing the drain opening with a stiff brush and drain cleaner removes the slime they breed in. Pouring bleach, vinegar or boiling water down the drain doesn't work and can damage the pipe, Alabama Extension says. Never use ammonia and bleach together, either, since the mix releases a hazardous gas.
How to get rid of gnats outside
Outdoors, some of the tiny flies people call gnats do bite: biting midges, also known as no-see-ums or sand flies. In North Carolina, NC State Extension says, controlling their young is impractical. Our webpage on whether gnats bite covers them. Drain flies also breed outside, on septic field lines or the ground under a leaking pipe or garbage can.
Getting help with flies
When the breeding site is out of reach or flies keep coming back, see our fly control webpage.
Gnat and small fly questions
How do I get rid of gnats in the house fast?
Start in the kitchen, since fruit flies are the usual kitchen gnat: take out the trash and get rid of overripe fruit and rotting vegetables, Texas A&M AgriLife Extension says. Tracking down the other breeding sites takes longer.
Can fruit flies bite?
No. Fruit flies don't bite, Texas A&M AgriLife Extension says, though most people find them annoying.
Are fruit flies harmful?
They can be if their larvae are eaten. Clemson Extension says fruit fly larvae in food may cause stomach distress or illness, especially if the breeding site is contaminated, so throw out fruit they've been breeding in.
Can drain flies bite?
No. Alabama Extension says drain flies don't bite or sting and aren't linked to the spread of diseases.
Are drain flies harmful?
Mostly they're a nuisance. Clemson Extension says most are harmless to people, though they may carry bacteria and other microorganisms from their breeding sites to places where people are.
How do I get rid of drain flies permanently?
Clean the drain itself. For flies breeding in drains, Mississippi State Extension recommends microbial drain cleaners, which clean the inner walls of the pipes, as the long-term control.
Want to know more? Read our guide about flies and gnats.
