If you have maggots in your house or yard, how do you know where they come from?
Maggots are most likely to come from indoor or outdoor bins, so this is the first place to look for them. Other maggots might come from soil, fruits, or even water. Maggots hatch from fly eggs that are close to whatever the maggots eat, so different maggots come from different places.
Below is a list of 8 places that maggots come from, so you can get rid of maggots if you don’t know where they’re coming from yet and determine what fly is causing the infestation. With this knowledge, you can prevent ever getting maggots again.
In this blog post, you’ll find out:
- The 8 places maggots come from and why
- How to kill maggots and keep them away
8 Places maggots come from

Maggots come from:
Garbage bins
Maggots usually come from garbage bins, either outdoor or indoor bins.
But how do they get in there?
Flies lay their eggs on food that sits out before getting thrown in the bin, or flies sneak into the bin and lay their eggs inside. The eggs hatch a few days later and hundreds or thousands of maggots emerge, ready to start eating.

And you’ll be surprised how small the gap needs to be for flies to get into a bin and maggots to get out!
I have a swing bin and maggots sneak out through a gap in the lid, where the button is to open the lid.
If you need a temporary fix, glue a piece of gauze, bandage, or material over a gap in a bin until you buy another one. I glued gauze on the hinges of my bin and it worked well until my toddler pulled it off.
See how the maggots pour out from the tiny gap in my bin’s lid and drop to the ground? It reminds me of a zombie apocalypse movie! I’m changing my bin to one that seals shut tightly.
Click here to read my article on how to find where maggots are coming from.
Flies that lay their eggs in garbage are:
– House fly
House flies love laying eggs in garbage, especially food scraps, rotten fruits and vegetables, meat, and bones. If they have access to any of these things in your garbage bags or bins, they crawl inside and lay eggs there.
Unlike some other types of flies, house flies lay eggs on the food their maggots eat. Other flies lay eggs in a safe spot that’s near a food source, not on it.
Find out how to identify and get rid of house flies in THIS blog post.
Manure or animal poop
If you find maggots, check all sources of manure and animal poop to see if they’re coming from there. This includes poop on the grass, in cat litter trays, cages, and anywhere else in the yard that animals, wild or domestic, might be using.
Flies that lay their eggs in manure or animal poop are:
– House fly
House flies lay eggs in animal poop, which they eat by turning the poop into a liquid and sucking it up. If these flies choose poop, it’s usually pet poop, like that from dogs and cats.
Find out how to identify and get rid of house flies in THIS blog post.

– Stable fly
Stable flies lay eggs on horse manure, and this is where their maggots hatch.
So, if you have horses or you lay horse manure on your lawn to make it green, maggots could be coming from horse flies.
Soil
Soil is the regular earth or sand in a yard. There are different types and shades of brown soil, depending on the area where you live. If you dig a hole in the ground, you’re digging up soil.
Certain flies lay eggs in soil. The maggots that hatch from these eggs eat organic matter in the soil, like fungi, or things that live underground, like worms.
Flies that lay their eggs in soil are:
– Cluster fly
Female cluster flies lay eggs in lawn soil, near earthworms.
If you find maggots crawling around in your soil and/or eating earthworms, there’s a good chance they’re cluster fly maggots.
– Fungus gnat
Fungus gnat maggots are usually found in garden soil or potting soil, where they eat organic or decomposing materials such as fungi or rotting wood.
Look for the source of fungus gnat maggots from eggs laid on soil, in rotting wood, on animal waste, and in overwatered pot plants.
Find out how to identify and get rid of fungus gnat flies in THIS blog post.

Compost
Compost is a fertilizer that can be added to the soil in garden beds and plant pots. It’s a rich, dark brown soil that contains decomposed waste, like leaves and animal waste. Compost is purchased from garden centers, stores, online marketplaces like this one on Amazon, and places that sell gardening supplies.
If you’re using compost or making compost in a bin or a compost pile, look to see if that’s where the maggots come from.
Flies that lay their eggs in compost are:
– House fly
House fly maggots eat rotting food and waste, so food scraps and other decomposing materials in compost attract house flies to lay their eggs there.
Find out how to identify and get rid of house flies in THIS blog post.
– Fruit fly
If there’s rotting fruits or vegetables in a compost pile, there’s a chance fruit flies will lay eggs there. If they do, you’ll soon see fruit fly maggots crawling around the compost pile or inside the rotting materials.
Find out how to identify and get rid of fruit flies in THIS blog post.

Dead animals
Dead animals, like roadkill, attract flies. If something’s died on your property, on a nearby road, in the roof or attic, or anywhere else close by, that might be where the maggot infestation lies.
Flies that lay their eggs in dead animals are:
– Blow fly
Though it might make your stomach turn, blow fly maggots play an important role in breaking down dead animals and putting nutrients back into the soil.
When they hatch, they start eating the meat by tearing it into tiny pieces with their sharp mouthparts. They then turn the meat into liquid with digestive enzymes, before sucking it up.
Find out how to identify and get rid of blow flies in THIS blog post.
Open wounds
If there’s an open sore or wound releasing pus on an animal or human, and you see maggots burrowing into the skin around the wound, the maggots came from fly eggs on or near the wound.
Flies that lay their eggs in open wounds are:
– Blow fly
Blow flies lay eggs on or near wounds that are a few days old. When the maggots hatch, they climb under the skin and start eating the flesh.
These flies are also attracted to fur that’s soaked in urine or feces, not just open wounds.
Blow fly maggots under the skin require medical attention from a professional.
Find out how to identify and get rid of blow flies in THIS blog post.

Fruits and vegetables
Some flies are vegetarians (called herbivores in the animal world) and eat fruits and vegetables. Their maggots usually come from nearby produce, either in the kitchen or out in the yard.
Flies that lay their eggs in fruits and vegetables are:
– Fruit fly
Fruit flies with red eyes feast on fruits and vegetables, and so do their maggots. These flies lay eggs on the surface of food so their maggots can start eating as soon as they hatch.
Find out how to identify and get rid of fruit flies in THIS blog post.
Water
Several types of flies lay eggs near or in water. Their maggots eat algae, bacteria, fungi, microorganisms, worms, and/or slime in the water.
Some flies like standing water that’s still, some like running water that moves, and others like very little water, such as a few drops.
If you want to find out where maggots are coming from, check your drains, swimming pool, bird bath, sponges, mop, and anywhere else water might be.
Flies that lay their eggs in water are:
– Drain fly
If there are maggots coming out of your drains or sewer system, there’s a good chance they hatched from drain fly eggs.
These flies lay eggs in standing water, septic tanks, gutters, bathrooms, and pretty much anywhere there’s moisture.
Find out how to identify and get rid of drain flies in THIS blog post.

– Horse fly
Horse flies usually lay eggs outside, so this is where you’ll find their maggots.
Up to 1 000 eggs are laid at a time on plants and rocks near water, and white or brown hungry, carnivorous maggots emerge a few days later.
After hatching, the maggots drop into the water or onto the moist ground below and start looking for food, which can be anything from worms and insect larvae, to other insects.
Find out how to identify and get rid of horse flies in THIS blog post.

– Mosquito
Yes, mosquitos are a type of fly. In fact, mosquitos make up about 3 600 species of flies!
The difference is that larvae that hatch from mosquito eggs are called wrigglers, not maggots. But wrigglers can be mistaken for maggots, so I’ve included them in this list so you know you might have a problem with mosquitos…

Mosquitos lay eggs on rocks in water or on the sides of containers with standing water. Wrigglers hatch and drop into the water, where they live until they turn into pupae and later fly off as mosquitos.
Mosquito wrigglers probably come from standing water in your yard or home, such as a pond, swimming pool, gutters, vases, pot plants, a bird bath, or anything else that’s holding water.
– Fruit fly
Fruit flies with dark eyes (brown or black) lay eggs near damp spaces.
If you have a problem with these flies’ maggots, look for the source of the eggs in dirty mops, damp rags and sponges, near drains and urinals, and in empty cans or bottles that contained water or liquid.
Find out how to identify and get rid of fruit flies in THIS blog post.
How to get rid of maggots
If you have maggots, it’s a good idea to kill them as quickly as possible. Here are my best tips and tricks, and products from Amazon, that work well:
- Seal bones and food waste in ziploc bags before throwing them away in the bin. Keep all food covered and sealed when it’s out on the kitchen counter, and put it in the fridge or freezer as soon as possible.
- Use bins that seal completely, so flies can’t sneak their way into the trash to lay eggs.
- Pick up animal poop daily, as many flies love laying eggs in animal feces.
- If there are a few stray maggots crawling around, squash them yourself. Place a few squares of toilet paper over a maggot and squash it with your fingernail, until you hear it pop. Then close the toilet paper over the squashed maggot, pick it up, and throw it away or flush it down the toilet. If you don’t squash maggots, they often survive and become flies that lay more eggs (and cause more maggots) in your home.
- If there are a lot of maggots in your home or bin, spray them with an insecticide designed to kill flies. Here’s one of the maggot spray killers I use and love because it works fast and kills them all.
- Wash away the maggots with hot soapy water.
- Clean maggot-prone areas and your bins with cleaning products that have a scent flies don’t like, such as this citrus-scented hospital-grade spray or this commercial fly repellent. Remember that you need to keep flies away because they are the ones that lay the eggs that maggots hatch from. Here’s my blog post about all the smells that flies hate, if you want to know more.
- If you keep on getting maggots in your bin, indoors or outside, place these garbage guards in your trash cans. The guards last up to 4 months and kill all maggots, flies, and other insects. Be sure to put the guards where animals and children can’t get them.