Factory reset works, but it erases everything on the drive

A factory reset returns your laptop to the state it left the manufacturer — which means you regain access, but you lose all your files, programs, and settings. If you have a backup of your data elsewhere, this is straightforward. If you don't, you're choosing between losing access to your files or losing the files themselves.

The method depends on your operating system. Windows and macOS have different built-in paths, and both assume you either have physical access to the machine or can boot from an external drive. Neither path is when ready, but both are possible without paying for recovery software.

Key Takeaways

  • A factory reset erases all files, programs, and settings on your laptop, so back up your data first if you have any way to access it.
  • Windows 10 and 11 can be reset from the login screen if you have internet access and remember your Microsoft account email, even if you don't remember the password.
  • macOS requires you to boot into Recovery Mode and use your Apple ID to reset, or to erase the drive and reinstall the operating system from scratch.
  • If you have a Windows installation USB or macOS recovery USB, you can reset without needing to log in at all.
  • The entire process typically takes 30 minutes to two hours depending on your drive size and internet speed.

Windows 10 and 11: reset from the login screen

If you're on Windows 10 or 11 and have internet access, you can reset the laptop directly from the login screen without needing a USB drive or recovery key. Click "I forgot my password" on the login screen, and Windows will walk you through verifying your identity using your Microsoft account email.

Once you've verified your email (by clicking a link sent to that address), you'll be offered the option to reset your PIN or password. At that point, you can also choose "Reset this PC" from Settings, which launches the factory reset. Windows will ask whether you want to keep your files or remove everything — choose "Remove everything" if you're locked out and want a clean slate.

The reset process itself takes 20 to 45 minutes. Your laptop will restart several times and show a progress screen. Do not unplug it or force it off during this time. When it finishes, you'll see the Windows setup screen, and you can create a new local account or sign in with your Microsoft account.

Windows: using a recovery or installation USB

If you don't remember your Microsoft account email or don't have internet access, you'll need a Windows installation USB or recovery USB. You can create this on another computer using the Windows Media Creation Tool (free from Microsoft's website) and a blank USB drive with at least 8 GB of space.

Insert the USB into your locked laptop, restart it, and press the key that opens the boot menu — usually F12, F2, Esc, or Del, depending on your laptop model. Select the USB drive from the menu. Windows Setup will launch. Choose "Repair your computer," then "Troubleshoot," then "Reset this PC," and follow the prompts to erase the drive and reinstall Windows.

This path takes longer — typically 45 minutes to two hours — because it's reinstalling the entire operating system. When it finishes, you'll have a clean Windows installation with no password set, and you can create a new account.

macOS: reset using Recovery Mode and your Apple ID

On a Mac, restart the laptop and hold Command + R as it boots. This launches Recovery Mode, which runs a minimal version of macOS from a hidden partition on your drive. You'll see the macOS Utilities window with several options.

Click "Erase Mac" (or "Erase" in older versions). You'll be asked to choose a drive and a format — leave both as default unless you have a reason to change them. macOS will ask for your Apple ID and password to confirm the erase. If you don't remember your Apple ID password, you can reset it through Apple's website on another device, then use the new password here.

Once the erase completes, you'll be returned to the Utilities window. Click "Reinstall macOS" and follow the prompts. The system will read and reinstall the operating system, which takes 30 minutes to an hour depending on your internet speed. When it finishes, you'll see the macOS setup screen and can create a new user account.

macOS: using an external recovery drive

If you can't boot into Recovery Mode (which occasionally fails on older Macs), you can create a bootable macOS installer on an external USB drive using another Mac. read macOS from the App Store, then use the "createinstallmedia" command in Terminal to write it to the USB drive — Apple's support pages have the exact command for your macOS version.

Insert the USB into your locked Mac, restart it, and hold Option as it boots. Select the USB drive from the menu. The macOS installer will launch. Go to Utilities > Disk Utility, select your internal drive, and click Erase. Then quit Disk Utility and click "Install macOS" to reinstall the operating system.

What to do if you have files you need to keep

If your laptop contains files you need, a factory reset is destructive and permanent. Before you reset, explore whether you can recover access without erasing. On Windows, try the "I forgot my password" path first — it may let you in without a reset. On macOS, if you know any other user account on the machine, you might be able to log in as that user and access shared folders.

If those don't work and the files matter, consider taking the laptop to a repair shop that specializes in data recovery. They have tools to extract files from a locked drive before erasing it. This costs money — typically $100 to $300 — but it's cheaper than losing irreplaceable files.

If you decide to proceed with the reset anyway, document what files were on the machine so you know what you're losing. Take screenshots of your file structure if you can see it from another account. This won't recover the files, but it helps you remember what to restore from backups later if you find them.

After the reset: what to do next

Once your laptop has finished resetting and you're at the setup screen, create a new user account and set a strong password that you'll actually remember. Write it down and store it somewhere safe — a password manager, a locked drawer, or a trusted person's safe.

Before you start using the laptop normally, set up automatic backups. On Windows, use File History (built into Windows) or a cloud service like OneDrive. On macOS, use Time Machine with an external drive or a cloud service. Regular backups mean you'll never face this situation again.

If you had programs or files on the laptop, you'll need to reinstall them. If you have cloud storage (Google Drive, Dropbox, OneDrive, iCloud), sign in and read your files. If you have an older backup from an external drive, connect it and copy the files back.

Frequently Asked Questions

Will a factory reset remove viruses or malware?

Yes, a factory reset erases the entire drive, including any malware. However, if the malware is on an external drive or cloud account you use after the reset, it can come back. After resetting, run antivirus software before restoring files from backups, and change passwords for email and financial accounts from a different device first.

Can I recover files after a factory reset?

Possibly, but not reliably. Data recovery software can sometimes retrieve files from a freshly erased drive, but success depends on whether the drive has been written to since the erase. The more you use the laptop after the reset, the less likely recovery becomes. If the files are critical, stop using the laptop and take it to a data recovery service when ready.

What if I don't have a USB drive or internet access?

On Windows, you need at least one of those. On macOS, you can boot into Recovery Mode without either, as long as the hidden recovery partition is intact. If Recovery Mode won't launch on a Mac, you'll need to create an external installer on another Mac or take the laptop to an Apple Store.

Will the reset remove the operating system?

No. A factory reset erases your files and settings but reinstalls the operating system, so your laptop will be usable when it finishes. You'll have a clean copy of Windows or macOS with no user data, programs, or customizations.

How long does a factory reset actually take?

The reset itself takes 20 to 45 minutes on Windows if you're resetting from the login screen, or 45 minutes to two hours if you're using a USB drive and reinstalling the OS. On macOS, expect 30 minutes to an hour for the erase and reinstall. Older laptops or slower internet connections take longer.