Changing system date from Terminal – OS X recovery

When you’re booting your Mac from the recovery partition and are planning to reinstall OS X, you might be met by the following message:

An error occurred while preparing the installation. Try running again

Now, if you haven’t used your Mac for a while, the error might be caused by an incorrect system date setting. You can check this by going to utilities and opening the terminal. Once in the terminal enter the following command and hit return/enter:

date

The result of this command will be the date that the system currently has been set to. For some reason, it might have been reset to 2001, in which case we need to set it to the right date. To do this, we enter a new command. This command will be entered as follows:

date -u {month}{day}{hour}{minute}{year}

Every bracket should be replaced with a two-digit number based on UTC time. Below you see what the command should be for your current time and date – . To avoid trouble with timezones, we will use UTC time instead (). Which means, you can just enter it exactly like this:

date -u 

Enter the command and hit return. You can then check if it was set correctly by running the first command again. If the date was wrong, it was likely that which caused the error, and after you quit the terminal it should be able to install OS X just fine.

Buying a Tesla? Use my referral link at the purchase of your new Model 3, S or X Read about Referral Program

I'm a webdeveloper based in Oslo, Norway. I currently work with web development at Nettmaker.

I would like to change the world, but they won't give me the source…

4.5 2 votes
Article Rating
Subscribe
Notify of
guest

46 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments