Wearing rubber gloves, thoroughly clean the cabinet surfaces you’re going to paint with a trisodium phosphate solution (follow the instructions on the box), which will slightly etch the surface.
Rinse thoroughly with a wrung-out sponge and allow the surfaces to dry. If you’re going to install new hardware that won’t use the same screw holes, fill in the old holes with wood putty.
Once dry, lightly sand the surfaces with 150-grit sandpaper and then vacuum to remove the dust. Wipe any residual dust off with a slightly damp cloth.
Then mask the surfaces around the cabinet boxes with painter’s tape and cover the floors and counters with drop cloths.