Moss can be charming when it grows on trees, but it is unsightly when it grows in sidewalks or on roofs. Moss can even shorten the life of a roof. Borax is a good moss-killing treatment for man-made structures such as these, since no other vegetation will be harmed by its application.
Pour white vinegar into a container and dissolve as much borax in it that you can, stirring or shaking the container the whole time.
Pour the solution into a hand sprayer, being careful not to let in any undissolved borax crystals. Undissolved crystals can clog the sprayer's nozzle.
Spray the moss, making sure not to get any solution on surrounding vegetation. Repeat weekly. If no results are seen, increase the frequency to daily. You'll know moss is dying when it turns orange.
Repeat as needed, since the moss will likely eventually come back. Permanent fixes are not generally known.
Solve any moisture problem that may be making the roof or other area hospitable to mold. Moss tends to grow on the north side of trees and structures, since that tends to be the side with the most moisture because the sun doesn't reach it. Cutting down a tree to eliminate shading on the roof or walkway may reduce the cooling and moisture.