The previous owners of my home painted the deck with paint that was not appropriate for the job. The paint is peeling off in large sheets. I would like to remove the paint and replace it with a solid stain (which, as I understand is more appropriate for the job).

Is it okay to stain a surface that has been painted? If so, what do I need to do to make sure the stain lasts as long as possible? Thanks for any help you can give!