Having to reinstall macOS is a pain at the best of times, but when the reinstallation doesn’t work for the first time, it can be both frustrating and worrying. There are lots of reasons why macOS installation might not work, though. And most of them are not serious. Usually, they’re quite straightforward to fix. In this article, we’ll show you how to do just that and what to do when you see the error message ‘an error occurred while preparing the installation.’

What does ‘an error occurred while preparing the installation mean’

The error message ‘an error occurred while preparing the installation’ essentially means that your Mac wasn’t able to complete the update, but it can’t tell you why. One of the most common reasons for this specific message is that the date and/or time settings on your Mac are incorrect. However, there are other possibilities, such as an unstable internet connection and problems with Apple’s servers. So, the first thing to do is try and identify the cause of the problem. Then we can try and fix it. We’ll start with the simplest and most likely causes and work from there.

An easy way to check for problems

There are lots of ways that files on your Mac can cause problems and error messages, including:

  • Junk files taking up space and causing conflicts
  • Malware infecting applications and stealing data
  • Launch agents and login items slowing down your Mac

Checking for all of those regularly is time-consuming, but you don’t have to — you can have CleanMyMac X do it for you. Its Smart Scan module will look for junk files, check for malware, and find opportunities to optimize your Mac. When it’s done, it will show you what it has found, and you can clean up and optimize your Mac with a couple of clicks. You can download CleanMyMac X here and try it for yourself.

CleanMyMac X - Smart Scan complete

Date and time

As we said earlier, one of the most common causes of this error message is that the date and time on your Mac are incorrect. Here’s how to check:

  1. Click on the Apple menu and select System Settings.
  2. Choose General, then Date & Time.
  3. Check the time displayed in that panel is correct.
  4. Unless you have a good reason not to, turn on Set Time and Date Automatically and set the Source to Apple.
  5. Quit System Settings.
System Preferences - Date & Time

Internet connection

Another reason that an OS installation may fail is that your internet connection is unstable. Check it by visiting a website in a browser, streaming music or video, or checking your social media feeds. If those work as they should, you can rule out your internet connection as the cause of the problem.

Apple’s servers

If your internet connection is working properly, the problem could be with Apple’s servers. Apple has a page on its website that tells you the current status of its online services. Here’s how to access it:

  1. Click here to go to Apple’s status page.
  2. Look for ‘macOS Update’ status indicator.
  3. If it’s green, it’s working, and so you can rule it out as the problem. If there’s a red dot, it means there is a problem, and you will have to wait until it’s fixed.

Safe mode

If the date and time on your Mac are correct and there is no problem with your internet connection or Apple’s servers, the next step is to restart your Mac in safe mode. Booting into safe mode loads only the extensions essential to start up your Mac. It also performs checks on your boot disk and fixes any problems it finds. The process for booting into safe mode is different depending on whether you have an Apple silicon or Intel-based Mac.

Apple silicon

Shut down your Mac, then press and hold the power button until you see ‘Loading startup options’ on the screen. Choose your boot disk and press and hold the Shift key. Click Continue in Safe Mode. When your Mac restarts, you will see ‘Safe Boot’ in the menu bar.

Intel

Press and hold the Shift key, then press the power button to start up your Mac. Keep the Shift key held down until you see the login window. Log in. If you’re asked to, log in again. Your Mac will restart, and when it boots, you will see Safe Boot in the menu bar.

Recovery mode

If you still see ‘an error occurred while preparing the installation’ when you try to install in Safe mode, the next step is to use Disk Utility to repair your startup disk. To do that, you’ll need to boot your Mac into recovery mode. As with safe mode, the process is different for Apple silicon and Intel-based Macs.

Apple silicon

Shut down your Mac and then hold down the power button until you see startup options. Click Options.

Intel

Shut down your Mac, then press the power button and hold down Command-R until you see macOS Utilities.

Choose Disk Utility from the macOS Utilities screen, choose your boot disk, and click First Aid in the toolbar. Wait until it has finished repairing the disk. Then boot your Mac normally and try the update again.

Disk Utility window

If repairing the disk doesn’t work, you can install the most recent version of macOS from recovery mode. If that’s the version you were trying to install when you got the error, reboot into recovery mode and choose Reinstall macOS from macOS Utilities. 

Erase and install

The last resort, if you still get the error message and can’t install an update, is to erase your Mac completely and reinstall macOS. This will delete all your data and settings, so it’s essential that you backup your Mac first. It’s best if you use Time Machine to back up, as that will make it easier to restore data and settings.

Tip

Before you back up your Mac, it’s a good idea to get rid of junk files so that you don’t back up those, too. The easiest way to do that is to use the System Junk module in CleanMyMac X, which will scan your Mac, identify the junk files, and allow you to delete them with one click.

CleanMyMac X - System junk scan complete

To erase the boot disk on an Intel Mac that doesn’t have a T2 security chip, boot into recovery mode, choose Disk Utility, and then click Erase in the toolbar after selecting your boot disk. Follow the instructions on the screen to name your disk and choose a format (APFS is best). When it’s finished, quit Disk Utility and choose Reinstall macOS in macOS Utilities.

On an Apple Silicon Mac or an Intel-based Mac with a T2 security chip, go to Apple menu > System Settings > General and choose Transfer or Reset, then Erase all Content and Settings. Follow the instructions on the screen to erase your Mac and set it up again from scratch.

The error message ‘an error occurred while preparing the installation’ usually means a problem has arisen while your Mac was trying to install a macOS update. Follow the steps above to fix it and install the update.