repair ceiling leak stains
After fixing the leak, you might want to try bleach.  I had luck with 25 percent bleach in water.  I put a sponge, saturated with the solution, in a plastic tray and pressed it up onto the ceiling.  The stain returned in a few months and so I did it again...it is now gone.  You could try a small test area to see if it will work.
Bleach is nasty stuff.  Take precautions.