Climb onto the roof using a ladder. Have a helper hold the ladder while you climb it.
Examine the damaged aluminum roof ridge vent. If it’s bent or twisted, replace it with a new one. If the vent simply came loose from the roof, you can reinstall it. Pry up the nails that were holding the roof ridge in place with the hammer claw and remove the vent if it’s broken beyond repair.
Squeeze out a line of silicon caulk under the roof ridge vent on both sides of the hole and set the vent over the caulk.
Line up the vent so it overlaps the one before it and after it by half an inch and apply a line of caulk at both ends of the vent. Hammer the vent into the rafters of your roof with 1-inch-long nails to keep it from coming loose again.
Squeeze out a dab of caulk around each nail head after the roof ridge vent is replaced.