To get rid of fruit flies with hydrogen peroxide, mix one part hydrogen peroxide with three parts water. Place the mixture in a spray bottle and spray it around the areas where the fruit flies are present.