Fruit flies can be found almost anywhere where fruit is allowed to rot and ferment. They will breed in and around ripened fruit and other food items and are also known to breed in drains, empty cans and bottles. Females can lay up to 500 eggs which can hatch in about one day. The fly larva feed while going through a few instars before pupating into adult flies. In ideal conditions, the entire life cycle can be completed in about one week but can take much longer if cooler conditions persist. Due to their small size, it is practically impossible to exclude the flies from buildings.