Clean up animal feces such as in a cat s litter box right away.
Flies attracted to carpet.
If you have a lot of blow flies in your house there may be a dead animal trapped in your walls.
Tie the plastic bag tightly and properly close the trash bin to prevent gnats from getting attracted to the smell and breeding inside the trash can.
We purchased some fly swatters a couple of years ago.
Often they ll just fly inside your home but can also get inside on pets or clothes.
Carpet beetles are often attracted to light and warmth indoors.
For information on carpet moth treatment please click on this link.
Get a fly swatter.
These bugs lay eggs in soil where conditions are moist and there is decaying matter to feed upon.
It is wise to begin looking at the first appearance of phorid flies before the corpse can begin emitting an unpleasant smell.
Some types of flies are drawn to fecal matter and rotting meat including carcasses.
Still others congregate near sewage and other filth.
Remove rotten or overripe fruit from the kitchen dispose of all organic foods outside.
The eggs of the gnats hatch in the soil and the larva live and feed on fungal material found there.
Flies are attracted to light.
Ensuring that you vacuum thoroughly around the edges of room and under furniture is imperative as moths will thrive in undisturbed areas.
Clean up pet or livestock feed to keep house and stable flies away.
Gnats are also attracted to decaying organic material wheres fruit flies only feed on produce.
Eliminating and preventing phorid flies.
Moths are different from flies and from your question i will assume you actually have flies on your carpet.
Others are attracted to sugary and vinegary substances.
However blow flies are only attracted to fresh carcasses so they don t stay very long.
The flies will go down into the jar drink the solution and become poisoned and trapped in the jar.
You may need to tear open your walls to remove the corpse.
According to pest control company orkin different types of flies are attracted to different substances and materials.
Avoid using rat poison to kill rodents because the carcasses can attract flies.
Phorid flies are often the first pest drawn to these corpses followed by other scavenger insects such as carpet beetles mites and other flies.
Moths are attracted to moisture in spills and perspiration as well as food traces.
Flies are attracted to food so i further assume that there is some food material solid or liquid resident in the pile.
They work great if you have good aim.