Reinstalling macOS fixes just about any problem you have with the operating system, but it may be overkill. It's a good option if your computer no longer boots, or there are system-level problems you can't resolve. It's also useful if you had an installation go so wrong that you're better off returning to square one. If you're careful and lucky, you can even reinstall macOS without erasing your hard drive.
Information in this article applies to macOS Catalina (10.15) through macOS Sierra (10.12).
Choosing the Correct Way to Reinstall macOS
Your first reinstallation choice should always be to reinstall macOS without erasing your boot drive. This approach preserves your user files by replacing macOS system files with known good versions. If this doesn't fix your problem, then you can erase the boot drive and perform a fresh reinstall. Only use a bootable USB installer to reinstall macOS if you can't boot into Recovery Mode at all.
How to Reinstall macOS Using Recovery Mode
The standard method for reinstalling macOS is through Recovery Mode, which boots from a separate recovery partition on your boot drive that macOS creates at the time of installation.
You're unable to change the partition you boot from. To unlock the boot partition to make changes, macOS boots from the recovery partition. In the recovery partition, you're free to make changes and adjustments to your primary boot partition, including completely erase it or reinstall macOS.
To boot into Recovery Mode, restart your Mac. Hold down Command+R as soon as your Mac shuts off and while the computer starts up. Release the keys when you see the Apple logo, a progress wheel, or a password prompt.
If your Mac requires a firmware password, you need to enter it before you can successfully boot into Recovery Mode. This typically happens with Macs that are administered by an organization with a mobile device management policy. If you don't know the firmware password and can't get it, Apple may be able to unlock your Mac for you, if you can prove you own it.
How to Reinstall macOS Without Erasing Everything
If your macOS installation causes problems, you don't have to wipe the disk entirely and start over from scratch. The macOS can reinstall only the system files, replacing any corrupted or damaged system files.
This is the default method for reinstalling macOS. It's also the first method you should try since it's the least destructive. It might not fix your problems, but it's also not a nuclear option.
Boot into Recovery Mode and select Reinstall macOS from the macOS Utilities application. Then select Continue to begin the installation process. Follow the on-screen instructions to reinstall macOS.
How to Erase and Reinstall macOS
Wipe your hard drive and start completely clean with an erase and reinstall. Format with Disk Utility, and then reinstall macOS.
This process permanently deletes all the files on your boot drive, so be sure you have a backup before proceeding.
Boot into Recovery Mode and click Disk Utility from macOS Utilities.
Select your boot drive in the left pane.
Click Erase to reveal options for erasing your boot drive.
If you are installing Mojave or later, choose Apple File System (APFS) as your format. If you are installing High Sierra or earlier, choose macOS Extended (Journaled) as your format.
Give the drive the same name it had before erasure. The default name is "Macintosh HD."
Click Erase to wipe the drive.
Close Disk Utility to return to the macOS Utilities app.
Click Install macOS from the menu and follow the on-screen instructions to proceed with a typical installation.
Other Recovery Mode Options
By default, Recovery Mode enables the reinstallation of your macOS installation with the version of macOS installed on your Mac. But you can also access different installation tools that install different versions of macOS. You access these modes by holding different modifier keys while booting into Recovery Mode:Command+R: Boot into Recovery Mode and reinstall the latest version of macOS on your Mac.Option+Command+R: Boot into online Recovery Mode, which downloads the latest compatible version of macOS and installs it on your Mac. If your recovery partition is damaged or can't reinstall the version of macOS currently on your Mac, this network recovery can restore the installation with a fresh file download.Shift+Option+Command+R: Boot into Recovery Mode to install the version of macOS that initially shipped with your Mac or the closest available version.
Reinstall macOS Using a Bootable Installer
If your Mac has become so nonfunctional that you can no longer boot into Recovery Mode, never fear. You can reinstall macOS from a bootable USB installer. It's a complex process that requires at least one working Mac.
It's wise to create an up-to-date bootable installer in advance as an emergency repair tool.
You need a full version of the macOS installer and a USB drive formatted for macOS Extended with at least 12 GB of space. Use Disk Utility to properly format your USB before proceeding, if needed.
Download the appropriate macOS installer from the Mac App Store: macOS Catalina, macOS Mojave, or macOS High Sierra.
If your hardware isn't compatible with Catalina, Mojave, or High Sierra, you can try an earlier version of macOS.
After the installer automatically launches, quit the installer from the menu or press Command+Q.
Open Terminal and run the following command. Be sure to replace "USB" with the name of your formatted USB drive:sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/USB
If you're not installing Mojave, change the path to the correct name.
Enter your system password when prompted and press Return to authenticate the process.
Type Y and press Return to confirm the installer creation. This erases the USB drive and writes the bootable installer image to the USB drive.
When the process is complete, reboot your Mac while holding down the Option key to enter the boot selection menu.
Select your USB drive from the boot selection menu.
Follow the on-screen instructions to format and reinstall macOS on your primary hard drive.