How to Get Rid of Maggots in Your House for Good

Killing maggots you can see is the easy part: boiling water does it instantly. The harder, more important step is finding and eliminating the source where flies laid their eggs, because if you skip that, the maggots will be back within days. Flies lay eggs in clumps of up to 300 at a time, and those eggs hatch in roughly 24 hours, so a small problem becomes a big one fast.

Kill Visible Maggots First

Before you deal with the root cause, you need to handle what’s crawling around right now. Several common household items work well, and you don’t need to buy anything specialized.

Boiling water is the fastest option. Pour it directly over the maggots, making sure the water contacts each one. They die on contact. Once the water cools, sweep up the dead larvae and seal them in a plastic bag before tossing them out.

A vinegar and hot water mix works well for trash cans. Combine one part white vinegar with three parts hot water, pour it into the can, and close the lid for 30 minutes. Drain the liquid afterward, then rinse the can with the same vinegar solution to disinfect it.

A bleach solution is another reliable option. Mix equal parts bleach and hot water, pour it into the affected area, and close any lid to let the fumes do their work. For stubborn residue, wipe the surface down a second time with undiluted bleach to destroy whatever the larvae were feeding on.

Salt dehydrates and kills maggots if you don’t have cleaning products handy. Cover the larvae and the surrounding area with a thick layer of table salt, leave it for about an hour (direct sunlight speeds it up), then sweep everything away.

Diatomaceous earth is a good choice if you have pets or children nearby and want to avoid chemicals. Make sure the area is dry, spread an even layer of the powder over the maggots, and wait several hours. The fine particles damage the larvae’s outer layer and dehydrate them. Sweep up the powder and dead maggots, seal them in a bag, and clean the area with a vinegar solution.

Find Where the Flies Laid Eggs

Maggots don’t appear from nowhere. A fly found something rotting in your house, landed on it, and deposited eggs that hatched within a day. If you only kill the visible maggots without removing the food source, another fly will lay a fresh batch in the same spot. Flies are attracted to rotting food waste, animal feces, and organic matter that’s breaking down in warm, moist conditions.

Check these common indoor sources:

  • Kitchen trash cans, especially if the bag leaked or food scraps have been sitting for several days in warm weather.
  • Forgotten food, like a potato that rolled behind a bin, fruit left on the counter too long, or a spill under an appliance.
  • Pet areas, including food bowls with leftover wet food and litter boxes that haven’t been cleaned recently.
  • Sink and floor drains, where organic buildup like grease and hair creates a breeding ground inside the pipe.
  • Outdoor trash cans near doors, where maggots can migrate inside or flies enter when the door opens.

Finding the source sometimes means getting on your hands and knees and following your nose. Maggots grow from 2 mm to 20 mm in just four days, so the size of the larvae tells you roughly how long the infestation has been active. Tiny, thread-like maggots appeared within the last day or two. Larger ones, around the size of a grain of rice or bigger, mean the food source has been present for several days.

Clearing Maggots From Drains

Drain infestations are a special case because you can’t just pour boiling water and call it done. The organic sludge coating the inside of your pipes is what attracted the flies in the first place, and it needs to be physically and chemically removed.

Start by scrubbing the inside of the drain with a stiff wire brush to dislodge eggs and larvae clinging to the pipe walls. Then pour boiling water down the drain to flush out loosened material. Follow up with a bacterial or enzyme-based drain cleaner rather than harsh chemical products. These cleaners actively break down grease, hair, and organic buildup over time, converting it into water and carbon dioxide. Using one monthly keeps the drain inhospitable to flies long after the initial cleaning.

Enzyme cleaners are more effective for this specific problem than a one-time chemical blast because they keep working for up to 30 days between uses, removing the food source rather than just killing what’s currently there.

Deep-Clean Your Trash Can

After you’ve killed and removed the maggots, the trash can itself still holds residue that will attract flies again. Take the can outside, hose it out thoroughly, and scrub the interior with a bleach solution or all-purpose cleaner. Pay attention to the bottom and the rim under the lid, where liquids from leaky bags tend to collect.

Wipe it down one more time after the initial cleaning to catch anything you missed. Let the can dry completely in the sun before putting a new bag in and closing the lid. Moisture left inside the can is an invitation for flies to return. For outdoor bins that keep getting infested, some people place mothballs inside a tied-off piece of pantyhose and drop it in the bottom of the can as a deterrent.

Why It Matters Beyond the Gross Factor

Maggots aren’t just unpleasant to look at. Flies pick up harmful bacteria from animal waste and rotting material and transfer those pathogens to whatever surface they land on next, including your food. Salmonella and E. coli are two bacteria commonly carried by flies and their larvae. If contaminated food is eaten, symptoms like abdominal cramps, nausea, vomiting, diarrhea, and fever can appear within 12 to 72 hours and last four to seven days. Most people recover without medical treatment, but severe dehydration from vomiting and diarrhea sometimes requires hospital care.

This is why simply killing the maggots isn’t enough. The contaminated surface needs to be disinfected too.

Keeping Maggots From Coming Back

Prevention comes down to one principle: don’t give flies a place to lay eggs. In practical terms, that means a few habit changes.

Use trash cans with tight-fitting lids, and take bags out as soon as they’re full rather than letting them sit. In warm weather, food waste breaks down faster and produces stronger odors, so you may need to take trash out daily instead of waiting for the bag to fill. Store food in airtight containers, and don’t leave dirty dishes or glasses sitting on the counter. Clean up pet food bowls after meals instead of leaving wet food out.

Double-bagging meat scraps or fish waste before tossing them in the kitchen trash makes a noticeable difference, since these items produce the strongest odors and attract flies the fastest. If you compost, keep the bin sealed and located away from entry points to the house. Rinsing your trash can with a vinegar and water solution every couple of weeks prevents the slow buildup of residue at the bottom that draws flies even when the current bag is clean.