Bend the counterflashing pieces upward carefully, followed by the roofing shingles covering the base of the chimney to access the step flashing. The counterflashing pieces, sometimes called cap flashing, are the metal flaps embedded into the chimney mortar that cover the top of the step flashing.
Remove the old step flashing from the roof. Pry the roofing nails out of the flashing with a pry bar, then gently pry the flashing off the roof. It is important to try to maintain the shape of the flashing, as it can be used as a template when cutting the new step flashing piece.
Cut the new flashing piece with tin snips using the old flashing piece as a replacement.
Apply roofing cement to the underside of the flashing piece.
Position the new flashing piece against the chimney, and drive a single roofing nail through each end of the flashing and into the roof deck with a hammer.
Bend the counterflashing pieces over the new flashing.
Apply roofing cement to the bottom of the shingles that cover the flashing, and lower the shingles onto the flashing.