A factory reset wipes your iMac completely and returns it to the state it left the factory
A factory reset (also called an Erase and Reinstall) removes every file, account, and setting from your iMac and installs a fresh copy of macOS. When you finish, the machine looks and behaves like it did the day it arrived — no personal files, no login history, no saved passwords, no browser data. This is useful if you are selling the iMac, giving it away, or handing it to someone else. It is also the nuclear option if malware or a corrupted system has made the machine unreliable.
The process takes 30 minutes to two hours depending on your internet speed and which macOS version you are installing. You will need your Apple ID and password, and you cannot undo it once you start — so back up anything you want to keep first.
Key Takeaways
- Back up your entire iMac using Time Machine or another backup tool before you start, because a factory reset deletes everything on the drive.
- You will need your Apple ID password and an internet connection; the process installs a fresh macOS from Apple's servers.
- On newer iMacs with Apple Silicon chips, you restart into Recovery Mode and use the Erase and Reinstall option; on older Intel models, the steps are slightly different.
- After the reset finishes, you will see the setup screen as if the iMac is brand new, and you can choose whether to restore from a backup or set it up as a new machine.
Back up everything before you start
A factory reset erases your entire drive. Before you touch anything, create a complete backup using Time Machine (Apple's built-in backup tool) or a third-party tool like Carbon Copy Cloner or SuperDuper. Plug in an external hard drive, open System Settings, go to General > Time Machine, click Add Backup Disk, and select your external drive. Let it run to completion — this usually takes an hour or more the first time.
If you do not have an external drive, you can back up to iCloud by going to System Settings > [Your Name] > iCloud and turning on iCloud Drive, Photos, and Mail. This is slower and does not capture everything, but it saves your most important files. Do not skip this step.
Restart your iMac into Recovery Mode
Shut down your iMac completely. Then turn it back on and when ready hold down Command + R (on newer Apple Silicon iMacs) or Command + Option + R (on older Intel models) until you see the Apple logo or a spinning globe. Keep holding until the Recovery Mode window appears — this usually takes 30 to 60 seconds.
If you see a login screen instead, you held the keys too late. Shut down again and try once more, pressing the keys the moment you press the power button. Recovery Mode should show you a menu with options like Restore From Time Machine Backup, Reinstall macOS, and Get Help Online.
Erase the drive using Disk Utility
In Recovery Mode, click Disk Utility and then Continue. You will see a list of drives on the left side. Click the top-level drive (usually called Macintosh HD or your iMac's name), then click the Erase button at the top.
A dialog will ask you to name the drive (you can call it Macintosh HD or anything else), choose a format (leave it as APFS for newer iMacs, or Mac OS Extended for older ones), and select a scheme (leave it as GUID Partition Map). Click Erase and confirm. The process takes a few minutes. When it finishes, quit Disk Utility and you will return to the Recovery Mode menu.
Reinstall macOS from Recovery Mode
Back in the Recovery Mode menu, click Reinstall macOS (or Reinstall OS X on older machines) and then Continue. You will be asked to choose a drive — select the freshly erased one. The installer will read macOS from Apple's servers, which can take 20 minutes to an hour depending on your internet speed.
Do not interrupt this process or unplug your iMac. Once the read finishes, the installer will run automatically and your iMac will restart several times. You will see a progress bar and a timer. Let it finish completely — this is the longest part and can take an hour or more.
Set up your iMac as new or restore from backup
When the installation finishes, your iMac will restart and show the setup screen, just like when it was brand new. You will be asked to select a language, connect to Wi-Fi, and sign in with your Apple ID. At this point, you have two choices: set it up as a new machine (which means starting from scratch with no files or accounts), or restore from your Time Machine backup (which puts all your files, accounts, and settings back).
If you are keeping the iMac for yourself, restoring from backup is usually faster than re-downloading all your apps and files. If you are giving the iMac away or selling it, skip the restore and set it up as new — the new owner will see a clean machine and can create their own account.
Verify the reset worked and find your data
After setup finishes, open Finder and check that your old files are gone (if you chose not to restore). Look in Applications to confirm your old apps are not there. If you restored from backup, your files and accounts should be back exactly as they were.
If you are giving away or selling the iMac, make sure you signed out of your Apple ID, iCloud, and any other accounts before handing it over. Go to System Settings > [Your Name] and click Sign Out. This removes your personal data from the machine and prevents the new owner from accessing your accounts.
Frequently Asked Questions
Can I undo a factory reset after I start it?
No. Once you click Erase in Disk Utility, the process cannot be stopped or reversed. This is why backing up first is essential. If you realize you made a mistake after the erase completes but before you reinstall macOS, you may be able to restore from your Time Machine backup during the setup process.
What if I forget my Apple ID password during the reset?
You will need your Apple ID password to complete the setup after the reset finishes. If you forget it, go to iforgot.apple.com on another device before you start the reset, and reset your password there. Write it down or save it somewhere safe before you begin.
Do I need an internet connection for the whole process?
Yes. Recovery Mode needs internet to read macOS, and the setup process needs it to verify your Apple ID. If your Wi-Fi is unreliable, use a wired connection with a USB-to-Ethernet adapter if your iMac has Thunderbolt ports, or move closer to your router.
Will a factory reset remove malware or viruses?
Yes, a factory reset removes everything on the drive, including any malware. However, if the malware is on an external drive or in your iCloud account, it will still be there. After the reset, do not restore from a backup that was made while the malware was present — restore only files you know were clean, or set up as new.
Can I factory reset an iMac I do not have the password for?
If you forgot your own login password, you can reset it using your Apple ID during the setup process after the factory reset. If the iMac is not yours, you cannot factory reset it without the owner's Apple ID and password — Apple's security system prevents this to protect against theft.