Does Resetting a PC Remove Ransomware?
In this article
Yes, a full reset of a Windows PC will remove ransomware from the operating system and installed programs, because it wipes the system drive and reinstalls Windows from scratch. However, a reset does not recover files that the ransomware already encrypted, and it will not help if the malware has made copies elsewhere on your network or in cloud backups that you reconnect afterward. The short answer is that a reset cleans the machine, but it does not undo the damage or eliminate every risk.
What a Windows Reset Actually Does
Windows offers two reset options under Settings > System > Recovery (labels can differ slightly by version and region). The "Keep my files" option removes apps and settings but preserves personal files in your user folder. The "Remove everything" option wipes all personal files, apps, and settings, then reinstalls a clean copy of Windows. For ransomware removal, only the "Remove everything" option is appropriate, because ransomware often hides in startup entries, scheduled tasks, or user folders that "Keep my files" would leave behind.
Even "Remove everything" has a caveat: it reinstalls Windows from a local recovery image or the cloud, but it does not always securely erase every sector of the drive. On traditional hard drives, remnants of encrypted files or malware could theoretically remain recoverable with forensic tools, though this is rarely a practical concern for home users. On solid-state drives, the reset triggers a TRIM command that makes recovery very unlikely. For most people, a standard reset is sufficient to remove active ransomware code.
Why a Reset Does Not Fix Encrypted Files
Ransomware works by encrypting your files with a key that only the attacker holds. A reset deletes the encrypted files along with everything else, but it does not decrypt them. If you have no backup, those files are gone permanently. This is the most common misconception: people reset the PC hoping the files will return to normal, but a reset only gives you a clean slate, not your data.
Some ransomware also creates a ransom note and may leave copies of itself in hidden partitions or external drives. A reset of the main Windows partition will not touch a separate data partition or a connected USB drive. If you reset and then plug the same infected USB drive back in, you can reinfect the clean system.
Steps to Safely Reset a PC After Ransomware
Before you reset, take these steps to avoid making things worse:
- Disconnect from the network. Unplug the Ethernet cable and turn off Wi-Fi. Ransomware can spread to other devices or download additional payloads.
- Disconnect external drives and USB sticks. Do not reconnect them until you have scanned them on a separate, clean machine.
- Note the ransomware name if visible. The ransom note or file extension (e.g., .locked, .encrypted) can help you check if a free decryptor exists from a security vendor, though many variants have none.
- Back up any unencrypted files to a separate, clean drive. If some files were not encrypted, copy them to a USB drive that you will scan later. Do not back up encrypted files expecting them to be useful.
- Perform a full reset. Go to Settings > System > Recovery > Reset this PC > Remove everything. Choose "Remove files and clean the drive" if you want a more thorough wipe, though this takes longer.
- After the reset, change all passwords from a different, clean device. Ransomware often steals credentials before encrypting.
- Reinstall apps only from official sources and restore data from a backup you made before the infection, not from the infected drive.
If you are not comfortable with a reset, or if the ransomware has locked the screen so you cannot access Settings, you can use Windows Recovery Environment (WinRE) to reset. Boot from a Windows installation USB and choose "Repair your computer" > Troubleshoot > Reset this PC. This is also the path if the reset option is greyed out.
When a Reset Is Not Enough
A reset cleans the local Windows installation, but ransomware can persist in several places that a standard reset may not address:
- Other partitions or drives: If your PC has a D: drive or a separate data partition, the reset only affects the Windows partition. Malware on other partitions survives.
- External and network drives: Ransomware often encrypts files on mapped network drives and connected USB drives. Those devices remain infected or encrypted until cleaned separately.
- Cloud sync folders: If you use OneDrive, Google Drive, or Dropbox, encrypted files may have synced to the cloud. Reconnecting after a reset can pull encrypted versions back down. Check your cloud provider's version history to restore previous versions.
- Firmware or bootkit infections: Rare, but some advanced ransomware can infect the boot sector or firmware. A standard reset may not remove these. In such cases, a clean install from external media and a firmware update from the manufacturer are needed.
- Backups: If your backup drive was connected during the infection, it may also be encrypted. Always keep at least one backup offline or disconnected.
For these reasons, security professionals often recommend a clean install from a USB drive rather than the built-in reset, because it gives you more control over partitioning and ensures no leftover recovery partition is used.
Reset vs. Clean Install vs. Antivirus Removal
There are three main approaches to dealing with ransomware, and they differ in thoroughness and effort:
- Antivirus removal: Some security tools can remove the ransomware executable, but they cannot decrypt files. This is fastest but least reliable, as remnants may remain.
- Windows Reset (Remove everything): Reinstalls Windows and wipes the system drive. Good for most home users, but may leave other partitions and connected drives untouched.
- Clean install from USB: Formats the system drive and installs Windows from external media. Most thorough for the system drive, but still requires manual cleaning of other drives and cloud storage.
None of these options decrypt your files. If you have a backup, restore from it after cleaning. If you do not, your only hope is a free decryptor from a security vendor, which exists for some older ransomware families but not most modern ones.
Common Mistakes After a Ransomware Reset
People often undo the benefit of a reset by making predictable errors:
- Reconnecting the same external drive that was attached during the infection without scanning it first.
- Restoring files from a backup that was also encrypted or infected.
- Reusing the same passwords, which may have been stolen.
- Skipping Windows Updates, leaving the fresh install vulnerable to the same exploit.
- Assuming the cloud copy is safe and syncing encrypted files back to the PC.
After a reset, run a full scan with Windows Security or a reputable third-party antivirus before restoring any data. Keep the PC offline until you have confirmed the clean state.
Frequently Asked Questions
Will resetting my PC decrypt my files?
No. A reset deletes the encrypted files along with everything else. It does not recover the decryption key. Without a backup, encrypted files are lost permanently unless a free decryptor exists for that specific ransomware variant.
Does "Keep my files" reset remove ransomware?
It is not reliable. "Keep my files" preserves user folders and some settings, which can include malicious startup entries or infected documents. For ransomware, always choose "Remove everything."
Can ransomware survive a factory reset?
On the main Windows partition, no. But ransomware on other partitions, external drives, network shares, or cloud storage will survive and can reinfect the clean PC if reconnected. A rare bootkit could also survive a standard reset.
Should I reset or reinstall Windows from a USB drive?
A USB clean install is more thorough because it lets you delete all partitions and start completely fresh. A built-in reset is easier and sufficient for most home users, but a clean install is preferred if you suspect a deep infection or want to be certain.
What should I do with my backup drive after ransomware?
If the drive was connected during the attack, treat it as infected. Scan it with antivirus on a separate clean machine before using it. If it contains encrypted files, those files are not recoverable without the key.
Is it safe to use the PC immediately after a reset?
Yes, once the reset completes and you have changed passwords from another device. Keep the PC offline until you have installed updates and run a full antivirus scan, then restore data only from a known-clean backup.