Table of Contents

How to do a fresh install of OS X El Capitan from USB drive

I had to do a reinstall of my 2013 MacBook Pro and the stock installer would give me the old one which I would then need to upgrade to El Capitan. In computer world I prefer clean installs over upgrades as it always leaves residue from the older OS so I did it with USB drive and wrote it down below.

My USB drive was from a Linux install and OSX could not make heads or tails from it with GUI tools. But luckily OSX has command line tool diskutil that can.

Preparing

Format USB ready for usage with installer

This is simplest done with diskutil. Let's first look at what drive the USB is.

diskutil list

Then reformat the entire disk for install use this command, replacing diskN with the disk you see above as your USB drive:

diskutil eraseDisk JHFS+ ElCapInstall diskN

Make USB installation media

Once El Capitan has downloaded from Apple store make an install media with below command:

cd /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources
sudo ./createinstallmedia --volume /Volumes/ElCapInstaller --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app --nointeraction

Reboot and install

Reboot computer with command

sudo reboot

And hold option (alt) key while restarting. Select El Capitan installer media and the rest should be self explanatory.