Recover Windows Defender Deleted Files: Full Guide
In this article
Yes, you can often recover files deleted by Windows Defender, but the method depends on whether the file was quarantined or permanently removed. This guide explains the difference, shows you the exact steps for both scenarios, and covers prevention and alternatives.
How Windows Defender Handles Threats
Windows Defender (Microsoft Defender Antivirus) scans files in real time and during scheduled scans. When it detects a threat, it typically takes one of three actions:
- Quarantine: The file is moved to a secure folder and encrypted, so it cannot harm your system. You can restore it from the Windows Security app.
- Remove: The file is permanently deleted from your disk. This happens when the threat is severe or when quarantine is not possible.
- Allow: The file is left alone, but you may see a warning. This occurs when the detection is uncertain or the file is a known false positive.
Most of the time, Defender defaults to quarantine for unknown files, but it can remove files outright if the threat is well-known or if your policy settings say so.
Recovering from Quarantine (Easiest Method)
If your file is in quarantine, you can restore it directly from the Windows Security interface. This is the only official way to get the file back without third-party tools.
- Open the Start menu and type Windows Security, then press Enter.
- Go to Virus & threat protection.
- Under Current threats, click Protection history.
- Find the item that corresponds to your deleted file. The list shows the date, threat name, and action taken.
- Click the drop-down arrow next to the item, then click Restore.
- Confirm the action. The file will be placed back in its original location.
If you do not see the file in Protection history, it may have been removed permanently, or the history may have been cleared.
Recovering Permanently Deleted Files
If Windows Defender removed the file (not quarantined), it is gone from your disk. However, you may still recover it with file recovery software, because deleted data often remains on the drive until overwritten.
- Stop using the drive immediately. The more you write to the disk, the higher the chance the file’s data is overwritten.
- Use a reputable file recovery program that supports NTFS, exFAT, or FAT32 drives. Examples include Recuva, TestDisk, and PhotoRec (all free or open-source).
- Install the recovery tool on a different drive if possible, or use a portable version, to avoid overwriting.
- Scan the drive where the file was located. Deep scans take longer but find more files.
- When the scan finishes, look for the file by name, type, or date. Restore it to a different drive to avoid overwriting.
Success is not guaranteed. If the file was on an SSD, the TRIM command may have already erased the data blocks permanently. On HDDs, recovery is more likely if you act quickly.
Why Windows Defender Deletes Legitimate Files
False positives happen when Defender mistakes a safe file for malware. This is more common with:
- Keygens, cracks, or patch tools (often flagged as hacktools).
- Auto-clickers, macro-enabled Office files, or scripts.
- Small, unsigned executables from lesser-known developers.
- Files that behave like malware (e.g., modifying other executables).
Microsoft continuously updates definitions to reduce false positives, but they still occur. If you trust the file, you can add an exclusion before re-downloading or restoring it.
How to Prevent Future Deletions
If you regularly work with files that Defender flags, you can add exclusions to stop it from touching them.
- Open Windows Security > Virus & threat protection.
- Under Virus & threat protection settings, click Manage settings.
- Scroll to Exclusions and click Add or remove exclusions.
- Add a folder, file, or file type. For example, you can exclude your
C:\Users\YourName\Downloadsfolder.
Be cautious: excluding folders reduces your protection. Only exclude files you are certain are safe.
Common Problems and Misconceptions
Problem: Protection history is empty. This can happen if the history was cleared, or if the deletion was performed by another security tool. Check if you have a third-party antivirus that may have removed the file.
Misconception: Restoring from quarantine always works. Sometimes the file is corrupted or partially deleted. Restoring may bring back a broken file, especially if it was a DLL or a system component.
Problem: The file is not in the Recycle Bin. Windows Defender does not use the Recycle Bin for deletions. It either quarantines or permanently removes the file.
Alternatives to Windows Defender
If you find Defender too aggressive, you can use a different antivirus program. Many free and paid options exist, such as Malwarebytes, Bitdefender, or Kaspersky. These may have different detection rules and may not flag the same files. However, you should not run two real-time antivirus programs simultaneously, as they can conflict and slow down your system.
For cloud storage, consider using OneDrive or Google Drive. If you store files there, you can restore previous versions even if the local copy is deleted.
Frequently Asked Questions
Can I recover a file that Windows Defender deleted from an external drive?
Yes, the same methods apply. Stop using the external drive immediately, then use recovery software on it. If the drive is an SSD, recovery is less likely due to TRIM.
Does Windows Defender permanently delete files?
Yes, it can. When the threat is severe or the file is not quarantinable, Defender removes it permanently. The file is not sent to the Recycle Bin.
How long does Windows Defender keep quarantine files?
By default, Defender keeps quarantined items for 30 days, then automatically deletes them. You can change this in the Windows Security settings under Protection history.
Can I recover a file without third-party software?
If the file was quarantined, yes, you can restore it from Windows Security. If it was permanently deleted, you need third-party recovery software or a backup.
What if I don't see the file in Protection history?
It may have been removed before you checked, or the history was cleared. Try a file recovery tool immediately, and check if you have a backup in File History or cloud storage.