It’s easy to run a full factory reset on a Windows 10 or 11 computer, but the risk of losing all your files is viscerally real. To avoid devastating data loss, you’ll need to prepare ahead of time and choose the right options before you give your device a fresh start.

The two best reasons to completely reset a laptop or desktop are to fix catastrophic performance issues or wipe it as clean as possible before selling, donating, or otherwise disposing of the device. If you’re considering a factory reset as a method of repair, make sure you’ve exhausted your troubleshooting options, especially if there are no other problems with your computer other than it being slow and/or hot.

It’s also worth noting that while a factory reset is the most dramatic version of a reset you can do, you’re not required to go that far. When you reset a computer to its factory settings, you’re essentially installing a clean version of the operating system—everything will disappear except for the files and apps your PC’s manufacturer preinstalled on the device. Windows, however, offers a number of options that allow you to keep personal data, settings, and apps intact throughout the reset. It’s a custom process, so make sure you use the settings that best suit your needs.

First, back up your files

Although a reset won’t necessarily clear everything off your laptop or desktop, it’s best to back up everything you want to keep before you proceed. Everyone has their own preferred file storage methods, but if you’re looking for tips, you can start with our basic backup guide.

[Related: Rip out your computer’s guts and craft an external hard drive]

If you’re using OneDrive with Windows 10 or 11, many of your files may already be backed up to the cloud. You’re also probably in a good spot if you’re syncing files to a third-party cloud service like Google Drive or Dropbox. Even so, you should still take a quick spin around your hard drive to make sure you’ve grabbed everything.

One important piece of advice: If you know or suspect your computer has been infected with malware, be very careful about what you back up. Don’t just snag all the folders you can see—take some time to ensure you actually recognize the files. You wouldn’t want to back up a virus and reinfect your newly reset device.

Back up your apps if you can

Not every computer program can be backed up or synced with a cloud storage service, but some can. Go through whatever apps you want to keep and see if you can save their data. Even if you can’t, make sure you have all the files, purchase details, and login information necessary before you proceed with a factory reset or any other type of system refresh—you can use a password manager or just jot down the information on a piece of paper. You may have to redownload some or all of your apps and set them up from scratch once your computer reboots, and you don’t want to lose access to something you already paid for.

How to reset Windows 10 or 11

The steps to reset a Windows 10 or 11 computer are substantially the same, but the paths and menus may differ. This guide uses Windows 10 (the most popular of the two) as a baseline, with specific notes for where Windows 11 deviates. Also, if you’ve encrypted your laptop or desktop, you’ll need your BitLocker key to reset it. Microsoft can help you find that key if you’re not sure where or what it is.

Finally, make sure your computer is plugged in—Windows won’t reset if it’s running on battery power.

1. Open the reset options. The easiest way to find these is to click the Windows 10 Start menu, go to Settings (the cog icon), and select Update & Security followed by Recovery. Once you’re there, find Reset this PC and hit Get Started.

  • On Windows 11, the steps are slightly different: Start menu > Settings (cog icon) > System > Recovery > Reset this PC > Reset PC.
  • On versions of Windows 10 prior to version 2004 (released in 2020), you’ll need to follow these steps: Start > Settings > Update & security > Windows Defender > Device performance & health > Fresh Start > Additional info > Get Started.

If for some reason you can’t access your computer settings, you can also reset a laptop or desktop from its sign-in screen. To force your Windows 10 or 11 computer to display the login screen, press Win+L to lock your computer. Then click the power button icon in the bottom right corner of the screen (not your computer’s physical power button), hold Shift, and click Restart on the emerging menu. This will open the Windows Recovery Environment. From the Choose an option screen, pick Troubleshoot and Reset this PC.

[Related: When to repair your computer and when to replace it]

2. Decide how much you want to keep or remove. The next screen will offer you two options: to keep or remove your files, apps, and settings. No matter which one you pick, you may also need to choose whether Windows reinstalls from the cloud (Cloud download) or your device (Local reinstall).

  • Keep my files. If Windows asks, choose whether you want your files to be saved in the cloud or on your local drive. By default, this option will restore all apps and settings that came with the PC when it was brand new—a complete factory reset. To avoid that and keep only what you had most recently, hit Change settings and turn the toggle switch under Restore preinstalled apps? to No, then hit Confirm. If you don’t see those additional options, your computer didn’t have any preinstalled apps.
  • Remove everything. As you may have guessed, this will reinstall Windows 10 or 11 and remove your personal files, apps you and your PC manufacturer installed, and reset any changes you made to your computer’s settings.
    • Once you select this, you can also hit the Change settings link to decide exactly how clean you want your device to be (there’s a Yes/No toggle switch under a Clean data? heading—choose one and hit Confirm to lock it in). Cleaning the drive could take a couple hours but Microsoft recommends it if you plan to get rid of your PC—doing so will make it harder for people to recover anything. Otherwise, you can opt not to clean your data, which will be faster but less secure. The company also notes that this type of data erasure is aimed at consumers and doesn’t meet government or industry standards, so someone with enough expertise and resources might still be able to restore some of your data.

3. Check what will be reset. No matter which one you pick, you’ll have to hit Next to proceed. Windows will tell you it’s ready to reset your PC, and list everything that the reset will do. You can click View apps that will be removed to see exactly what will be trashed.

4. Reset your PC. Once you’ve confirmed everything, hit Reset to start the process. There’s no standard for how long this will take on Windows 10 or 11, factory reset or otherwise, but your screen could turn black for more than 15 minutes and your PC might restart multiple times. In all, you could be waiting a couple hours, so be patient—if you try to manually restart your computer while it’s working, the reset could fail.