Reinstall macOS on a Mac
How to reinstall macOS, with or without erasing your Mac. Use macOS Recovery for a reinstall or a clean install, or install from a bootable USB drive when Recovery is not available.
Reinstalling macOS replaces the operating system while your files stay where they are. A clean install goes further: it erases the drive first, so the Mac starts over with nothing on it but the operating system. This guide covers both options, plus the factory-reset feature that is often the better choice when someone else will get your Mac.
You are reading the Mac Install Guide, a trusted source for Mac setup. See the Mac development setup guide for more.
Before you get started
You can reinstall without the command line, but you'll be better equipped by upgrading the terminal application. Apple includes the Mac terminal but I prefer Warp Terminal. Warp is an easy-to-use terminal application, with AI assistance to help you learn and remember terminal commands. Download Warp Terminal now; it's FREE and worth a try.
First steps to reinstall macOS
First, check the macOS version. If you're running an older version, update macOS to the latest macOS version.
Then confirm the Mac supports the version you intend to install. See Mac Compatibility before you erase anything, because installation may not complete on an unsupported Mac, and you do not want to discover that after wiping the drive.
Decide which of the two installation routes you need. macOS Recovery is built into every Mac and needs no USB drive, but it downloads the system over the internet, which takes time. A bootable USB installer carries the full installer, so you can download once and use it on multiple Macs. The Mac still connects to the internet during installation either way, because the installer gets firmware and model-specific information from Apple. See Download macOS to get the installer package as fast as possible. See Create a Bootable USB Installer for macOS if you want a portable installer device.
If you wanted an updated macOS rather than a fresh copy of the current one, you do not need any of this. See Upgrade macOS instead.
Decide between a reinstall, a clean install, and an erase reset
An "over the top" reinstall puts a fresh copy of macOS over your existing system. Your files, applications, and settings stay in place. Use it when macOS is damaged in a way that stops normal startup or operation. Apple designs the reinstall to preserve your data, but if you can, make a backup first, in case the installation or the drive itself fails.
A clean install erases the drive first, then installs macOS on empty storage. It takes the most time, so treat it as a last resort for a misbehaving Mac: most problems have smaller fixes, so work through the checks in the troubleshooting section at the end of this guide before you erase everything.
A reset with Erase All Content and Settings removes your data and settings but keeps the installed macOS. On the Macs that support it, the reset is the best way to prepare a Mac for sale or trade-in, because it also removes your personal information and the Activation Lock that ties the Mac to your Apple Account. The "erase" reset gets its own section below.
To summarize: A reinstall keeps your files in place. A clean install deletes them, gives you a fresh copy of macOS, and you must restore your files from a backup or another copy you made before the erase. "Erase All Content and Settings" is for selling or giving away your Mac without your files.
Back up your data before a clean install
A clean install erases everything on the Mac. Files come back only from a copy that exists somewhere else, so back up before you start, not after you decide.
- Connect an external drive with enough free space
- Use Time Machine, or copy your important files by hand
- Verify the backup opens before you go any further
A verified Time Machine backup can restore your files, applications, and settings together. A manual copy restores selectively, which suits a fresh developer setup. Seeing filenames listed in a cloud folder is not verification, so open a few of the files from another device before you erase.
If you have no external drive, copy the files you care about to cloud storage such as iCloud Drive or Google Drive, or push your code to a Git host. If you are disciplined, it is a good strategy to keep all important work in a cloud folder or Git repository, so your local drive can fail or be replaced without losing your work.
Reinstall macOS from Recovery
macOS Recovery is a small startup system Apple builds into every Mac. It can reinstall macOS without a USB drive, and it downloads what it needs over the internet, so the Mac has to be online. A network with a sign-in page, such as a hotel or campus network, can block Recovery, so use a home network or a fast phone hotspot instead.
Start up in macOS Recovery
The startup steps depend on the processor in the Mac.
Macs with Apple Silicon:
- Shut down the Mac and wait for the screen to go dark
- Press and hold the power button until "Loading startup options" appears
- Click Options, then Continue
- Select a user and enter the password if the Mac asks
Recovery on a Mac with Apple Silicon always starts from the Mac's own storage, with no internet fallback. If Recovery will not load at all, see the firmware step at the end of the troubleshooting section.
Intel-based Macs: restart the Mac, then immediately hold one of these combinations, and release the keys when you see an Apple logo or a spinning globe.
- Command + R starts the Recovery system on the Mac, which reinstalls the macOS version currently installed
- Option + Command + R starts Internet Recovery, which might offer the latest macOS the Mac supports
- Shift + Option + Command + R starts Internet Recovery, which might offer the version the Mac shipped with, or the closest version still available
The two Internet Recovery combinations also work as a fallback when the Recovery system stored on the Mac is damaged.
Reinstall over your existing system
This route refreshes macOS and leaves your files and applications in place.
- Select "Reinstall macOS" in the macOS Utilities window
- Click Continue to start
- Unlock the disk with your login password if the installer asks, which happens on an encrypted disk
- Choose "Macintosh HD" as the destination, not "Macintosh HD - Data"
- Select an administrator account and enter its password if asked
- Keep the Mac awake and plugged in while it installs
Your Mac stores the system and your files on two paired volumes. "Macintosh HD - Data" holds your files. Choosing "Macintosh HD" replaces the system volume only, and Apple designs the process to leave the data volume alone. A backup is still your safety net in case the installation or the drive fails.
Expect several restarts and progress bars, and expect the screen to stay dark for minutes at a time. That is normal. Let the installation finish on its own.
Erase the drive for a clean install
For a true clean install, erase the drive before you reinstall. Do this only after the backup above is done and verified. To prepare a Mac for someone else, skip this and use Erase All Content and Settings below when the Mac supports it.
- Select "Disk Utility" in the macOS Utilities window
- Select "Macintosh HD" in the sidebar
- Click Erase in the toolbar
- Keep the name "Macintosh HD" and the format Disk Utility recommends
- Click "Erase Volume Group" if that button appears, or Erase if it does not. The volume group button wipes the paired system and data volumes together, which a clean install requires.
- Quit Disk Utility when the erase finishes
- Select "Reinstall macOS" and choose the freshly erased drive
- Follow the setup prompts when the installation completes
You now have a fresh installation of whichever macOS version your Recovery route offered, on an empty drive. On a Mac with Apple Silicon, keep the internet connection alive after the erase, because the Mac must activate with Apple before it can reinstall.
Reinstall macOS from a bootable USB drive
Use this route when you are setting up several Macs, or when Recovery itself will not start. The drive carries the full installer, so each Mac skips the multi-gigabyte download. The Mac still connects to the internet during installation, because the installer gets firmware and model-specific information from Apple.
You need a bootable USB installer first. See Create a Bootable USB Installer for macOS to make one. That article also covers starting a Mac from the finished drive, and the security setting that stops some Intel-based Macs from starting from external drives.
Once the Mac has started from the USB drive, the macOS Utilities window offers the same choices Recovery does. To keep your files, select "Install macOS" and follow the prompts. For a clean install, first erase the drive with the same Disk Utility steps shown above, then select "Install macOS". Leave the Mac plugged in and let the installation run through its restarts.
Erase All Content and Settings
Erase All Content and Settings is the factory reset built into macOS. It securely removes your settings, data, and apps, along with your personal information, Activation Lock, and trusted iCloud status, while keeping the installed macOS in place. It does not reinstall the operating system, so use it to reset a healthy Mac, not to repair a damaged system.
The feature requires a Mac with Apple Silicon or the Apple T2 Security Chip, running macOS Monterey 12 or later. Open System Settings > General > Transfer or Reset > Erase All Content and Settings and follow the prompts. On macOS Monterey, open System Preferences and choose Erase All Content and Settings from the System Preferences menu.
Prepare a Mac for a new owner
To sell, trade in, or give away a Mac, use Erase All Content and Settings when the Mac supports it. The reset signs you out, removes Activation Lock, and leaves the Mac ready for the buyer's own setup.
On a Mac without the feature, do the sign-outs by hand before you erase. Turn off Find My in iCloud settings, sign out of iCloud and Messages, and deauthorize the Mac in the Music app under Account > Authorizations > Deauthorize This Computer. Then erase and reinstall as shown above; on an Intel-based Mac, Apple also suggests resetting the NVRAM, a small memory that stores settings, after the erase. When the Mac restarts into Setup Assistant, press Command + Q and shut down instead of continuing. Setup then belongs to the new owner.
Turning off Find My matters most. A Mac still tied to your Apple Account by Activation Lock cannot be set up by the buyer.
Fix common macOS reinstall problems
Most failed reinstalls trace back to the network, the disk, or the installer itself. Here are the frequent failures and the fix for each.
Fix Internet Recovery errors such as -2003F
A spinning globe with an exclamation point, or a numbered error such as -2001F, -2002F, or -2003F, means the Mac cannot reach Apple over the network. Connect with an Ethernet cable if you can, or switch to a different Wi-Fi network. Networks with a sign-in page block Recovery. On an Intel-based Mac, try one of the other Recovery key combinations, or retry later.
Fix a startup disk that does not appear
If the installer offers no destination disk, quit the installer and open Disk Utility from the macOS Utilities window. If "Macintosh HD" is missing there as well, disconnect nonessential external devices and try again. A disk that stays missing points to a hardware problem, so contact Apple Support before erasing anything else.
Fix an installer that cannot be verified
A message that the installer cannot be verified, or failed a signature check, usually means the Mac's clock is wrong. The installer checks its certificate against the current date. In Recovery, choose Utilities > Terminal in the menu bar to open a terminal application. The date command shows the system date:
$ date
If the date is wrong and the Mac is online, this command sets the clock from Apple's time server:
$ ntpdate -u time.apple.com
On a recent macOS version, sntp -sS time.apple.com does the same job. Run the installer again after the clock is correct.
Fix an installation that fails partway
Check the simple causes before you consider erasing. Free up storage on the target disk if the installer reports too little space. Keep the internet connection stable. Run First Aid on the startup disk from Disk Utility in Recovery. If a downloaded installer app fails repeatedly, delete it and download a fresh copy.
Fix an installation that seems stuck
Restarts, progress bars, and long dark screens are part of a normal installation. Before you judge it stuck, choose Window > Installer Log in the installer's menu bar and watch for new lines. An installation that runs well past an hour and a half with no log activity has probably stalled. As a last resort, hold the power button to shut down, then start over, with a wired network connection if Wi-Fi kept stalling.
Revive the firmware when nothing else works
In rare cases a Mac with Apple Silicon or the T2 chip cannot start Recovery and refuses every install. Apple's remaining route is a firmware revive or restore: you connect the Mac to a second Mac with a USB-C cable, put it in DFU mode, and use the Finder on the healthy Mac. A revive preserves your data when possible, while a restore erases the Mac. Apple documents the steps in How to revive or restore Mac firmware.
Continue setting up your Mac
Don't miss the full visual roadmap and checklist that shows how to set up a Mac for software development, with all the essential tools and settings you might not yet know about.