What a factory restore does and when you need one
A factory restore (also called a factory reset) wipes your hard drive and reinstalls the operating system that came with your computer when you bought it. Everything you installed after that—programs, files, settings, user accounts—gets deleted. Your computer returns to the state it left the factory.
You might do this if your computer has become slow or unstable after months of use, if malware has infected it badly enough that antivirus software cannot clean it, or if you are selling or giving away the machine and want to erase your personal data. A factory restore is more thorough than deleting files or running a cleaner program, because it removes the operating system itself and rebuilds it from scratch.
This is not the same as restarting your computer or clearing your browser cache. Those are quick fixes. A factory restore takes an hour or more and erases everything except the operating system and the programs that came pre-installed.
Key Takeaways
- Back up all your files to an external drive or cloud storage before you start, because a factory restore deletes everything on your computer except the operating system.
- Windows computers use the Reset this PC tool (found in Settings > System > Recovery), while Mac computers use macOS Recovery (restart and hold Command-R).
- You will need your Windows product key or Apple ID password to complete the restore, depending on your operating system.
- The process takes 30 minutes to two hours depending on your computer's speed and whether you choose to keep or remove your files.
- After the restore finishes, you will need to reinstall any programs you use regularly and restore your files from your backup.
Back up your files before you start
The first step is to copy everything you want to keep to an external location. This means documents, photos, videos, music, email archives, browser bookmarks—anything that is not part of the operating system itself.
The easiest method is to plug in an external hard drive and drag your files to it. You can also use cloud storage like OneDrive, Google Drive, or iCloud. If you have a lot of files, cloud storage may take several hours to upload, so start this step early.
Do not rely on the factory restore process to preserve your files unless you explicitly choose the "Keep my files" option during the reset. Even then, it is safer to have a separate backup somewhere else.
Factory restore on Windows
On Windows 10 or Windows 11, the built-in tool is called Reset this PC. Open Settings (press the Windows key and type "Settings"), then go to System > Recovery. You will see a blue button labeled "Reset this PC".
Click it. Windows will ask whether you want to "Keep my files" or "Remove everything". If you choose "Keep my files", Windows deletes all your programs and settings but leaves your documents and photos in place. If you choose "Remove everything", it erases everything except the operating system. For a computer you are selling or giving away, choose "Remove everything".
Next, Windows asks whether you want to reinstall from the cloud or from a local file. Cloud reinstall downloads the operating system from Microsoft's servers (requires a good internet connection). Local reinstall uses files already on your computer (faster if your internet is slow). Choose whichever matches your situation.
Windows will then ask for your Microsoft account password to verify you own the computer. Enter it, review the settings one more time, and click Reset. The process takes 30 minutes to two hours. Your computer will restart several times. Do not turn it off during this time.
Factory restore on Mac
On a Mac, restart your computer and hold down Command-R as soon as you hear the startup sound. Keep holding until you see the Apple logo or a spinning globe. This boots your Mac into macOS Recovery, a separate operating system that lives in a hidden partition.
In Recovery, you will see a menu with several options. Click "Erase Mac" (or "Reinstall macOS" if you want to keep your files). If you choose "Erase Mac", you will be asked to select your startup disk and confirm that you want to erase it. This deletes everything on that disk.
After erasing, macOS Recovery will reinstall the operating system automatically. You will need your Apple ID and password. If you do not remember your Apple ID password, you can reset it through Apple's website before you start the restore.
The process takes 45 minutes to two hours depending on your Mac's age and your internet speed. Your Mac will restart multiple times. Leave it plugged in and do not interrupt it.
What to do if you do not have your product key or password
Windows may ask for your product key during or after the reset. If you do not have it, Windows will still let you use your computer, but you may see a watermark on the desktop saying "set up Windows". You can still use all features normally.
To find your product key, check the sticker on the back or bottom of your computer (especially on laptops). If you bought Windows separately, check your email receipt or the case the disc came in. If you cannot find it, you can purchase a new key from Microsoft or use a free key-finder program.
For Mac, you need your Apple ID and password. If you have forgotten your password, go to iforgot.apple.com on another device and follow the steps to reset it. You will need access to a recovery email address or phone number associated with your account.
Reinstalling your programs and restoring your files
After the factory restore finishes, your computer will boot into a fresh operating system with no programs except the ones that came pre-installed. You will need to reinstall anything you use regularly.
Start by plugging in your external backup drive or signing into your cloud storage account. Copy your files back to your computer. Then read and install the programs you need: your web browser (if it is not already there), antivirus software, Microsoft Office, Zoom, or whatever else you use regularly.
This is a good time to be selective. If you had programs installed that you never used, skip them this time. Your computer will run faster with fewer programs competing for resources.
When to call a professional instead
If your computer will not start at all, or if it starts but you cannot log in because you have forgotten your password, a factory restore may not be possible without help. A computer repair shop can reset your password or perform the restore for you.
If you suspect your computer has a hardware problem (the hard drive is failing, the motherboard is damaged), a factory restore will not fix it. A technician can diagnose the problem and tell you whether the computer is worth repairing.
If you are not comfortable with the steps above, or if you are worried about losing important files, it is worth paying a technician to do the restore for you. The cost is usually between $50 and $150, and it removes the risk of making a mistake.
Frequently Asked Questions
Will a factory restore remove viruses and malware?
Yes. Because a factory restore erases the entire hard drive and reinstalls the operating system from scratch, it removes any malware that was installed on your computer. However, if the malware is on your backup drive or in your cloud storage, you can reinfect your computer when you restore your files. Scan your backup with antivirus software before copying files back.
Can I undo a factory restore after I start it?
Not once the erase process has begun. Before you click the final confirmation button, you can still cancel. Once the erase starts, your files are gone. This is why backing up first is so important.
How long does a factory restore take?
The process itself takes 30 minutes to two hours depending on your computer's speed and whether you are downloading the operating system from the internet or using local files. Reinstalling your programs and restoring your files afterward can take several more hours.
Do I need an internet connection for a factory restore?
For Windows, you can choose to reinstall from local files, which does not require internet. For Mac, you need an internet connection because macOS Recovery downloads the operating system from Apple's servers. Either way, a wired connection is faster and more reliable than Wi-Fi.
What happens to my files if I choose "Keep my files" on Windows?
Your documents, photos, videos, and other personal files stay on your computer. All your programs and settings are removed, so you will need to reinstall your programs. This option is useful if you want a fresh start but do not want to restore files from a backup afterward.