Scrape off the peeling paint, using a 3-inch drywall knife. Use the stiff blade to remove as much loose material as you can, prying it out if necessary. However, don’t gouge the drywall patch or the surrounding surfaces more than you have to.
Sand the patch with 100-grit sandpaper until it is somewhat smooth and even.
Apply a thin coat of joint compound to fill the nicks and gouges. A 12-inch drywall knife works well for covering large patches. Leave the area as smooth as possible. Allow the compound to dry for 24 hours, or according to the manufacturer’s directions. Repeat the coating and drying process as necessary until the patch is smooth and even.
Sand the patch with 150-grit sandpaper.
Apply oil primer to prevent moisture penetration from within the room. Stain-blocking oil primer is the best alternative if you have rusty water stains, which can bleed through other types of paint.
Apply interior paint, preferably a brand designed to withstand moisture.