How to Create a Mac OS USB Installer
In this article
Creating a bootable macOS USB installer lets you install or reinstall macOS on a Mac without downloading the entire operating system again, and it is the standard recovery tool when a Mac will not boot normally. You can also use it to upgrade several Macs without re-downloading the installer each time, or to perform a clean install after erasing a drive. The process uses Apple's own createinstallmedia command, which is built into every macOS installer, so no third-party software is required. Before you start, make sure you have a compatible Mac, a USB flash drive of at least 16 GB (32 GB for some larger releases), a stable internet connection, and a current backup of anything important.
What You'll Need
- A Mac running a version of macOS that can download the installer you want (generally the same release or newer).
- A USB flash drive with at least 16 GB of capacity. The drive will be completely erased, so back up anything on it first.
- A reliable internet connection, because the macOS installer is several gigabytes and downloads from Apple's servers.
- An administrator account on the Mac, since the terminal command requires elevated privileges.
- Optional but recommended: an external drive or cloud backup of your current data before you erase or reinstall anything.
Step-by-Step
- Back up the USB drive. Copy any files you want to keep off the flash drive. The next steps destroy all data on it, and there is no undo.
- Download the macOS installer. Open the App Store, search for the macOS version you want, and click Get or Download. Alternatively, use a direct link from Apple's support pages for older releases. The installer downloads to your Applications folder and is named something like Install macOS Sonoma. Do not open or run it yet; if it launches automatically, quit it from the installer menu.
- Confirm the installer is present. Open Finder and check that the installer app appears in Applications. If it is still in your Downloads folder, drag it into Applications so the terminal command can find it.
- Insert and identify the USB drive. Plug the drive into a USB port (avoid hubs if possible). Open Disk Utility from Applications > Utilities, select the drive in the sidebar, and note its name. You can also run
diskutil listin Terminal to see the device identifier, such asdisk2. - Erase and format the drive. In Disk Utility, select the USB drive itself (not just a volume), click Erase, choose the GUID Partition Map scheme, and format it as Mac OS Extended (Journaled) or APFS. Name it something simple like
MyUSBwith no spaces, which makes the next command easier to type. - Open Terminal. Launch Terminal from Applications > Utilities. You will type the command that writes the installer to the drive.
- Run the createinstallmedia command. The general form is
sudo /Applications/Install\ macOS\ Sonoma.app/Contents/Resources/createinstallmedia --volume /Volumes/MyUSB. Replace the installer name and volume name with your own. The exact path varies by release, so check the installer's Contents/Resources folder to confirmcreateinstallmediaexists. - Confirm the erase prompt. Terminal warns that the volume will be erased and asks for your administrator password. Type it (characters will not show) and press Return. The command then copies several gigabytes of files, which can take 15 to 45 minutes depending on the drive and port speed.
- Wait for completion. Do not unplug the drive or close Terminal while it is working. When it finishes, Terminal reports that the media is now bootable and returns to the prompt.
- Eject safely and test. Eject the drive from Finder, then restart the target Mac while holding the Option key to reach the startup manager. Select the USB installer to confirm it boots. From there you can run Disk Utility or install macOS.
Common Mistakes
The most frequent problem is selecting the wrong disk in Disk Utility and erasing a data drive instead of the USB stick. Always check the capacity and name before clicking Erase. Another common error is typing the installer name incorrectly in Terminal; spaces must be escaped with a backslash, or you can drag the installer into the Terminal window to insert the correct path automatically. Some people format the drive as MS-DOS (FAT) or leave the wrong partition scheme, which prevents the Mac from booting from it. Using a drive smaller than 16 GB, or a slow USB 2.0 stick, can cause the copy to fail or take far too long. Finally, running the installer app before creating the media can delete it from Applications, so quit it if it opens.
Tips
Use a reputable USB 3.0 or newer drive from a known brand for faster writes and fewer failures. Keep the drive labeled and store it somewhere dry; a bootable installer is a useful emergency tool to keep on hand. If you plan to install on multiple Macs, create the media once and reuse it rather than downloading the installer repeatedly. You can also verify the drive by booting from it on a spare Mac before you rely on it. For older Macs, choose an installer version that the hardware supports, since newer macOS releases drop support for older models.
Troubleshooting
If Terminal reports that the volume could not be found, check the exact name under /Volumes using ls /Volumes and match capitalization. If the command fails with a permissions error, make sure you used sudo and entered an administrator password. If the Mac does not show the USB drive in the startup manager, try a different USB port, avoid hubs, and confirm the drive was formatted with the GUID scheme. A stalled copy usually means a failing drive or a bad download; re-download the installer and try another stick. If the installer app refuses to open because it is from an older release, check Apple's support pages for the correct download and compatibility notes. When a Mac still will not boot from the drive, resetting NVRAM or trying another Mac can help isolate whether the problem is the drive or the computer.
Frequently Asked Questions
Can I use any USB drive? Any drive of at least 16 GB works, but a USB 3.0 or faster drive is much quicker and more reliable than an old USB 2.0 stick.
Will creating the installer erase my Mac? No. Only the USB drive is erased. Your Mac's internal drive is untouched until you choose to install or erase it.
Do I need the same macOS version as the target Mac? Not necessarily. The installer can usually install onto supported Macs, but check Apple's compatibility list for the release you download.
How long does it take? Typically 15 to 45 minutes, depending on download speed, USB speed, and the size of the installer.
Can I reuse the USB drive afterward? Yes. Erase and reformat it in Disk Utility to use it for normal storage again.
What if Terminal says the command is not found? The path is wrong. Open the installer's Contents/Resources folder in Finder and drag createinstallmedia into Terminal to insert the correct path.