Fruits and vegetables -- especially bananas, melon, tomatoes, squash, and apples -- are their favorites. Rotten onions and potatoes are also a big draw for these tiny, 1/8-inch-long creatures. An adult female fruit fly can lay up to 2,000 eggs on the surface of anything that's moist and rotting.