How to erase and restore a Mac to Factory Settings

Must know tricks for all Mac users

By Gizbot Bureau
|

Here’s how you had to do it earlier - Boot your Mac into Recovery Mode, go to Disk Utility, then erase your drive, followed by re-partition. Finally, reinstall the OS. Previous versions of macOS had this almost endless process of restoring your Mac to its factory settings.

How to erase and restore a Mac to Factory Settings

 

Thankfully, Apple has taken the hint. There’s an update rolled out in High Sierra that cuts down the tasks and time involved in the process. It makes restoring a simple and quick task. Explained below are the steps needed after the update.

Before you begin:

Certain points to keep in mind. Your Mac must be running an OS High Sierra 10.13.4 or higher. The feature '--eraseinstall’ was introduced in High Sierra. Alongside this, ensure that your hard drive is APFS formatted. Re-partition might not be possible otherwise.

Lastly, this will erase all data stored on the Mac. Therefore, if you wish to keep your data and restore it after you’ve erased everything, use Time Machine. You can choose any alternative method if you have any.

1. Download macOS installer

It’s best to keep a copy of the latest macOS installer and save it elsewhere for later use. You can download it through the App Store. It’ll be listed under Purchases. If not, the latest OS update will be present. Once downloaded, System Preferences will open automatically and it’ll be saved by default in /Applications. You can move it elsewhere. We’d recommend copying it to a USB drive or an external HDD as well.

2. Running the command

Within the downloaded installer, you’ll find a command called 'startsosintall’ under which you’ll find '--eraseinstall.’ To view this, you’ll have to open the installer through Ctrl+Click, and not a regular click. Go to Show Package contents > Resources. You’ll find 'startsosintall’, open Terminal and drag this command onto the window. Type '--usage’ at the end of the command and press Return.

 

You’ll be able to view a list of several options. Some of them are '--agreetolicense’, '--eraseinstall’, '--newvolumename.’ Each one has a special function, either to agree to the end-user license, erases the volume, and changes the name of the new volume.

Save this command elsewhere -

“/Applications/Install/ macOS Mojave.app/Contents/Resources/startosinstall” --eraseinstall --newvolumename “MacintoshHD” --agreetolicense

This is the line that will erase your Mac and restore it to factory settings. When you’ve backed up everything and all data has been taken care of, paste this command into Terminal and click Return. Just remember, if you’ve saved the installer anywhere else, that path needs to be used instead of /Applications.

After hitting Return, the command 'startostall’ will do the rest. From the next boot, it’ll be a fresh new macOS. You can restore your previous file and data from Time Machine and from where you’ve stored them.

Most Read Articles
Best Mobiles in India

Best Phones

Get Instant News Updates
Enable
x
Notification Settings X
Time Settings
Done
Clear Notification X
Do you want to clear all the notifications from your inbox?
Yes No
Settings X
We use cookies to ensure that we give you the best experience on our website. This includes cookies from third party social media websites and ad networks. Such third party cookies may track your use on Gizbot sites for better rendering. Our partners use cookies to ensure we show you advertising that is relevant to you. If you continue without changing your settings, we'll assume that you are happy to receive all cookies on Gizbot website. However, you can change your cookie settings at any time. Learn more