Determine what type of flies you have a problem with. The three most common flies that invade households are house flies, blow (or bottle) flies and fruit flies. House flies are dully colored and about ¼ inch long. Blow flies are also about ¼ inch long, with a shiny appearance, often blue or green. Fruit flies are very small, about the size of gnats.
Understand what leads to the presence of flies in your home. House flies are drawn to both garbage and animal feces, while blow flies are drawn to garbage and carrion. Fruit flies cluster around rotting fruit as well as sweet or fermented liquids.
Realize that flies lay eggs near what they feed on, and a large number of flies in your home usually means that the flies are breeding within your walls. You need to remove the flies' food to remove the breeding areas, and thus the flies.
Seek out what is drawing the flies into your home. For all types of flies, cover any uncovered garbage as a first step. Then, check for cleanliness of animal cages and litter boxes if you have a number of house flies, and check for a dead animal, such as a mouse, if you have blow flies. For fruit flies, remove uncovered vinegar, wine or sweet liquids as well as rotting fruit.
Maintain sanitary conditions to ensure that flies cannot breed in your home. Make certain that garbage can lids are tight fitting, that you take garbage out of your home regularly and that no food or liquids are left on the counter. Keep animal cages as clean as possible, and deal with other pest-control issues if a dead mouse or other animal led to the initial infestation.
Clean the outdoors as well as the indoors to ensure that flies do not cluster around your home. If you feed animals such cats or dogs outdoors immediately remove any uneaten food. Clean up animal feces, including horse manure, so it doesn't attract flies.
Check your window screens and repair any holes if larger flies are in your home. When flies come indoors in the summer, they generally don't leave and are likely to find a place to lay eggs if they can access anything that they feed upon.
Kill existing flies by treating your home with an insecticide designed to kill flies, or hang up flypaper if you prefer not to use chemicals indoors.