Maggots only live for approximately eight to 10 days in warm conditions before entering the fly stage. In colder environments, maggots can live as long as 30 days before entering the next stage.
Houseflies are common pests found in all areas of the world. The flies lay their eggs in decaying materials, manure and other moist areas. A female fly can lay as many as 150 eggs at one time and will lay around 1,000 during her lifespan.
The eggs laid by flies thrive in moist environments, as arid surroundings can dry them out and prevent hatching. After the eggs are laid, it takes anywhere from seven hours to two days for them to hatch, depending on the temperature. The warmer the weather, the quicker the eggs will hatch. When the eggs hatch, maggots are born. The larvae resemble small white worms, and they feed on rotting trash and manure. When the larva is ready for the next life cycle change, its skin changes to protect it from the different elements. When the skin hardens, the pupa begins to grow its legs and wings. After a few days, the fly is fully formed and breaks free from the casing.
With the sole purpose of reproducing, flies start seeking mates as soon as they leave the casing. Female flies lay eggs anywhere from a few days to three weeks after mating. The average lifespan of a housefly is three weeks to two months.