best way to delete and then reinstall WP

What is the ver best way to delete and reinstall WP from scratch and then restore the DB, I was thinking just delete the entire root folder contents, then reinstall WP and restore the uploads folder, the themes and then restore the DB. IS this close or is there a better way? thanks