If you’ve left your Mac lying around for a very long time or if you bought a used one, the system date may be out of whack. Often the system date on neglected Macs gets reset to the year 2001, which prevents you from reinstalling OS X, but you can get this done through Terminal.
UPDATE: This article is dated and may not be relevant to your version of macOS. Please use with caution and understand that whatever you do to your Mac is on you. We hold no responsibility for any damage following this guide may cause.
More often than not, you’ll get an error that reads, “An error occurred while preparing the installation. Try running again.” At this point, many people will throw in the towel and figure the computer is toast. But that’s usually not the case.
Change System Date From Terminal
Here are some simple steps to change the OS X system date from Terminal when doing a fresh install.
- Insert a USB key with OS X install into Mac (or install disc)
- Power up and hold the Option key down as soon as you hear the startup chime.
- Choose OS X to install
- Once booted into recovery, choose Utilities from the menu and then Terminal.
- Type date into Terminal and hit enter; this displays the date; if it is not the current date, you need to go to the next step.
- Type date into Terminal followed by today’s date in this format [month][day][hour][minute][year] so today is July 11, 2016, 2:15 that would be date 0711141516 then press enter. Of course, your date and time will vary.
- Rerun the first command in Terminal date and press enter; the date should now be fixed.
At this point, you should now be able to continue your reinstall of OS X on your Mac, and the installation error should no longer appear. For whatever reason, the system date matters when installing the OS on your Mac. So if you get that error, don’t panic and think your Mac is toast, try this fix first, and you should be golden.
This is a fairly easy fix, and it works wonders if you’ve purchased a Mac off of eBay or from Craigslist. Sometimes these Macs end up sitting around for a while, and the system date gets out of whack. Now you don’t have to worry about it being a brick and can bring it back to life.
Last Updated on June 14, 2021.