Prepare the roof for painting by using a plastic or wood scraper to remove any paint that is peeling from the roof.
Brush away any surface rust with a stiff bristle or wire brush. If the roof is made of tin, don't use a wire brush, as it may cause damage. Wire brushes may be used on other types of metal, such as aluminum or steel.
Clean the roof with detergent and warm water. Scrub it with a stiff bristled floor broom. If the surface does not easily clean--perhaps there's an accumulation of dirt or tree sap--a pressure washer may be used. Be careful not to dent or otherwise damage the metal.
Rinse the roof with a garden hose or the pressure washer and allow it to dry.
Apply primer to rust areas. Cover any remaining rust to prevent further corrosion. Once the primer has dried, paint and allow the paint to dry in keeping with the manufacturer's directions.