If you’ve noticed tiny black flies hovering around your houseplants, you’re dealing with fungus gnats. They’re about the size of a fruit fly, usually dark gray or black, and they love to circle lazily above the soil whenever you water your plants or walk past them.
These little pests are incredibly common in apartments and homes with indoor plants. You’re not doing anything wrong. Fungus gnats are just naturally drawn to moist potting soil, where they lay eggs that hatch into tiny larvae. The larvae feed on organic matter in the soil and sometimes nibble on plant roots.
The good news is that fungus gnats are more annoying than dangerous. They won’t bite you, and they rarely kill healthy plants. But they multiply fast, and once you have a few dozen flying around your living room, they stop being a minor irritation and start feeling like a real problem.
Here’s the even better news: you don’t need harsh chemicals, outdoor space, or any kind of heavy-duty pest control to get rid of them. Most apartment dwellers can tackle fungus gnats with simple, low-mess methods that won’t stink up your home or require you to haul plants outside.
This guide focuses on practical solutions that work in small spaces. Everything here is designed to be easy, affordable, and safe to use around pets and kids. You can handle this without turning your apartment into a science experiment.
Make sure it’s actually fungus gnats
Before you start treating anything, take a moment to confirm what you’re actually dealing with. Fungus gnats are tiny black flies that hang around the soil of your houseplants. They’re small, delicate, and kind of sluggish fliers. You’ll usually spot them hovering right at the soil surface or crawling around the rim of the pot.
The biggest giveaway is timing. Fungus gnats love moisture, so they tend to appear in bigger numbers right after you water your plants. If you see a little cloud of dark specks lift off when you move the pot or disturb the soil, that’s a strong sign you’ve got fungus gnats.
These aren’t the same as fruit flies, which are usually tan or brownish and hang out near your kitchen counter or trash. They’re also not drain flies, which are fuzzy-looking and tend to hover around sinks or shower drains. Fungus gnats stick close to the plant soil because that’s where their babies live.
Want a quick way to be sure? Place a yellow sticky trap near the base of your plant and leave it for a day or two. Fungus gnats are drawn to the color yellow and will get stuck on it. You can also gently dig into the top inch of soil and look for tiny, clear or whitish worm-like larvae. They’re hard to spot but sometimes visible if the soil is damp.
If you’re seeing flies but they’re not near your plants, you’re probably dealing with a different pest. In that case, skip the plant treatments and focus on your drains or food storage instead.
Let the top of the soil dry out on purpose
Fungus gnats love damp soil. The adults lay eggs in moist topsoil, and the larvae that hatch feed on organic matter and tiny roots in that wet environment. If the top layer of soil stays constantly soggy, you’re basically running a gnat nursery.
The good news is that breaking this cycle doesn’t require any products. Just let the top inch or two of soil dry out between waterings. Gnat larvae struggle to survive in dry conditions, and adults are less likely to lay eggs where the surface feels inhospitable.
Before you water, stick your finger into the soil up to your first knuckle. If it feels damp, wait another day or two. If it feels dry, go ahead and water. This simple check prevents you from watering on autopilot and keeps you tuned in to what your plants actually need.
You can also try watering from the bottom. Set your pot in a shallow dish of water for twenty minutes so the plant pulls moisture up through the drainage holes. This keeps the top layer drier while the roots still get what they need. Just don’t leave pots sitting in water for hours, and always empty the saucer afterward.
Some plants do need consistently moist soil, like ferns or calatheas. For those, you’ll need to combine this approach with other gnat strategies rather than letting them dry out completely. Watch your plants for cues. Slight drooping that perks up after watering is normal. Crispy leaf edges or severe wilting means you’ve waited too long.
Trap the flying adults so they stop reproducing
Yellow sticky traps are your secret weapon for breaking the fungus gnat cycle. These simple cards catch the flying adults before they can lay more eggs in your soil. When you combine traps with the drying-out method, you attack the problem from both ends at once.
The traps work because adult gnats are strongly attracted to the color yellow. They fly toward it, land on the sticky surface, and can’t escape. This stops them from laying hundreds of new eggs in your pots.
For a typical apartment setup with three to six plants, start with two or three traps. Place them right at soil level, either stuck into the pot on their little stakes or laid flat on the surface. The closer to the soil, the better, since that’s where gnats hang out most.
Don’t stick traps to leaves or let them dangle where you might brush against them. They’re very sticky and surprisingly annoying when they touch skin or hair. Keep them low and out of your way.
You’ll see gnats stuck to the traps within hours, which feels satisfying. But don’t expect the problem to vanish overnight. Traps only catch adults, not the larvae living in the soil. You need to keep the soil dry enough that those larvae can’t survive and mature into new adults.
Plan on two to three weeks before you notice a real drop in the gnat population. The first week you’ll still see plenty flying around as larvae keep maturing. By week two, if you’re staying consistent with watering and trapping, the numbers should fall noticeably. This isn’t a quick fix, but it works if you stick with it.
Add a clean, dry barrier on top of the potting mix
Fungus gnats love damp, exposed soil because that’s where they lay their eggs. If you cover the surface with a layer of dry material, you make it much harder for them to access the moist soil underneath. The barrier also helps the top layer of soil dry out faster between waterings, which is exactly what you want.
Good options for apartment dwellers include coarse sand, small decorative gravel, or pumice. These materials don’t hold moisture on their surface and they look tidy enough that you won’t mind them sitting in your living room. A thin layer about a quarter to half inch deep is usually enough to do the job.
To apply it, wait until your plant needs watering so the soil is on the dry side. Gently spread your chosen material across the entire surface, keeping it away from the plant stem itself. You don’t want to pile it against the stem or bury any low leaves.
The main tradeoff is that you’ll need to adjust how you water. You can still water normally, but you might need to water a bit more slowly so the water doesn’t just run off the barrier. You also won’t be able to easily check if the soil is dry by touching it anymore, so a wooden skewer or your finger pushed down past the barrier works better.
Keep in mind that the barrier only works if it stays dry on top. If you have a plant that needs constant moisture or you tend to overwater, this method might not be your best choice. And some materials like cinnamon or moss can actually trap moisture or grow mold indoors, so stick with the clean, inorganic options.
Use simple, low-odor natural remedies that work indoors
If you want to skip chemical pesticides, a few natural options work well in apartments without creating a mess or filling your home with strong smells. These remedies target the gnats at different life stages, so you can choose what feels most comfortable for your space.
Hydrogen peroxide is one of the gentler options. You can use a diluted solution as a soil drench to kill gnat larvae living in the top layer of soil. Mix it with water according to the product label and pour it slowly into the soil. The peroxide breaks down into water and oxygen quickly, so it won’t linger or harm most plants when used correctly. Just don’t expect it to solve everything overnight. It helps reduce larvae numbers, but you may need to repeat the treatment as new eggs hatch.
Beneficial nematodes are tiny organisms that hunt gnat larvae in the soil. They sound exotic, but they’re surprisingly apartment-friendly. You buy them as a powder or sponge, mix them with water, and apply the mixture to your pots. They work invisibly in the soil and don’t create any odor or mess. They’re living creatures, so follow the package directions carefully and use them soon after purchase.
Diatomaceous earth is a fine powder made from fossilized algae. When you dust a thin layer on top of dry soil, it creates a barrier that damages soft-bodied larvae and can discourage adult gnats. The key word is dry. It only works when the soil surface stays dry, so it’s best for plants that don’t need frequent watering. Use food-grade diatomaceous earth and apply it lightly to avoid creating dust clouds in your apartment.
Repot only when it’s truly worth the hassle
Most of the time, you don’t need to repot. But sometimes the soil itself is the problem, and no amount of yellow tape or watering adjustments will fix it.
Consider repotting if your soil stays wet for days even when you’re barely watering, if you see fuzzy mold or a thick crust on top, or if gnats keep coming back no matter what you try. Compacted soil that won’t drain properly becomes a gnat nursery, and sometimes the only real solution is starting fresh.
The good news is you can do this without creating a dirt disaster in your living room. Set up a work zone using a large trash bag laid flat on the floor, or work inside a big plastic tub if you have one. Gently tip the plant out of its pot and shake off as much old soil as you can into the bag. If the roots look brown and mushy instead of white or tan, trim those damaged bits with clean scissors.
Rinse out the empty pot with warm water to remove any lingering eggs or larvae. Then replant using fresh indoor potting mix, the kind that drains well and doesn’t stay soggy. Pack it gently but don’t compress it into a brick.
After you’re done, keep the repotted plant away from your other houseplants for a week or so, just to make sure you didn’t bring any stowaways along. Wipe down your work area and wash your hands. Tie up that trash bag and get it out of your apartment right away so any gnats inside can’t escape back into your space.
Prevent apartment fungus gnats from coming back
Once you’ve cleared up a gnat problem, a few simple habits can keep them from moving back in. The good news is that most of these take just a minute or two and don’t require any special equipment.
Start by quarantining new plants for a week or so before mixing them in with your collection. Set newcomers in a separate spot and keep an eye out for tiny flies. This gives you a chance to catch hitchhikers before they spread to every pot in your home.
If you store bags of potting soil indoors, keep them tightly sealed or clipped shut. Open bags are an open invitation for gnats to lay eggs in moist, undisturbed soil. The same goes for any compost or fertilizer you keep around.
Get in the habit of plucking off dead leaves and spent flowers from your plants. Decaying plant material sitting on the soil surface gives gnats a little buffet and extra moisture to breed in. A quick tidy-up when you water makes a real difference.
Overwatering is the biggest gnat magnet, so let the top inch or two of soil dry out between waterings. Empty any water sitting in saucers or decorative cachepots after an hour or so. Standing water keeps everything damp for much longer than it needs to be.
If you’ve crammed plants into a corner or packed them tightly on a shelf, the air can’t move around much. That trapped humidity keeps soil surfaces wet even when you’re careful with watering. Try spacing pots out a bit more or just shifting things around so there’s a little breathing room. You don’t need a fan or dehumidifier. Just a few extra inches between pots can help soil dry faster and make life harder for gnats.
Know when to escalate or ask for help
If you’re doing everything right, you should see fewer adult gnats flying around after about a week or two. Your sticky traps will catch less over time, not more. The top inch of soil will stay drier, and your plants should look healthy or start perking up.
That’s what normal improvement looks like. It’s gradual, not instant, but you should notice a clear downward trend by the second or third week.
If things aren’t getting better after three weeks of consistent effort, or if they’re getting worse, something else might be going on. Maybe the gnats are actually coming from a drain or garbage disposal instead of your plants. If you’re seeing flies near sinks but not near your pots, that’s a clue. Or maybe your plants are declining quickly despite treating the gnats, which could mean root rot or another issue entirely.
When your first approach isn’t working, try combining two methods at the same time. Use sticky traps and bottom watering together, for example. Make sure you’re treating every single plant at once, not just the ones that seem worst. Sometimes gnats just hop from pot to pot if you miss one.
If you’re still stuck, bring a photo of your plant and describe what you’re seeing to a local plant shop. They can often tell whether you’re dealing with fungus gnats or something else, and they’ll know which products are practical for indoor apartment use. They deal with this stuff all the time and won’t judge you for asking.