Remove the door from the frame as well as any shims. Pry the frame off the studs and header or saws-all them off.
Now the important stuff. Carefully cut the bottom of the jambs for height. The top of the jamb should be within 1/4 inch of the header. Remove the door from the new unit and install the jamb using finish nails and shims to ENSURE it is level, square and true. Take your time as that is the most important part. Hang the new door and test it. If things look good, replace the molding, set the nails, fill and paint/stain.
Good luck