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.

Advertisement

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.

Advertisement

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.

Advertisement

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.

Advertisement

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.

Advertisement

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.

Advertisement

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.

Best Mobiles in India