What he said...and if all that fails then make a backup of your working install and then it's a simple matter of burning to the sd-card...about 6 minutes tops... and rebooting.
https://www.raspberrypi.org/documentatio.../backup.md
scroll to "sdcard image" and do that.
https://www.raspberrypi.org/documentatio.../backup.md
scroll to "sdcard image" and do that.
----------
bob
bob