Scrub off as much rust as possible using a stiff wire brush. Remove all the flaking with a brush and work the brush into the rusted spots.
Clean the surface using a hose to remove as much of the dirt and debris as possible. Work on a warm day when the water will quickly evaporate. If the roof stays wet for too long you will aggravate the rust problem.
Apply a metal primer to the roof using a bristle paintbrush or roller brush. Use a primer with rust inhibitors to stop further rust from forming. Allow the primer to cure according to the manufacturer's instructions.
Paint the roof with a water-based paint that complements the primer. Use paint designed for metal that has a rust inhibitor. Apply it in the same manners as the primer, using a paintbrush or roller, and allow it to cure according to the manufacturer's instructions. Apply a second coat of paint.