You can use bleach to kill fruit fly eggs on surfaces, but there are more environmentally safe methods that are equally effective, including simple hot, soapy water. Pouring bleach down drains to kill fruit flies is ineffective, because the bleach doesn’t remain in contact with them long enough to deal any damage. Baking soda and hot vinegar is a more effective way to get rid of fruit flies in drains.