Windows Defender, the built-in antivirus in Windows, keeps a log of all the threats it detected and actions it performed on those threats. You can see those logs in the Protection History page of Windows Defender. Normally, this log is automatically cleared once every 30 days. However, sometimes you might want to clear it sooner. In this tutorial, we’ll show you a couple of easy methods to clear the protection history in Windows Defender whenever you need. Let’s get started.
Note: The steps shown below are tested to work on Windows 11, 10, and 8.
Note: You need administrative privileges to delete Windows Defender history.
Clear Protection History using File Explorer
The easiest way to clear the protection is by simply deleting the logs from the Windows Defender scans folder.
First, open the Run dialog box by pressing Windows key + R.
Enter the following path in the Run dialog box and click OK.
Select all the files in the Service folder by pressing the Ctrl + A. Next, delete them by pressing the Delete key on your keyboard.
With that, you’ve cleared the defender protection history. You can close the File Explorer.
Clear Protection History Using Command Prompt
Alternatively, you can also use the Command Prompt to clear Windows Defender protection history. This method is useful for those who like to use command-line tools or want to create custom scripts.
First, open the Start menu, search for Command Prompt, right-click on the result, and select the Run as Administrator option. This will open the Command Prompt window with administrator rights.
In the Command Prompt window, run the following command.
del /f /s /q "C:\ProgramData\Microsoft\Windows Defender\Scans\History\Service\*"
As soon as you run it, the Defender log files are deleted and the protection history is cleared. You can close the Command Prompt window.
Troubleshooting: Cannot Open Windows Defender Scans Folder
If you getting an Access Denied error when opening the Scans folder in the Windows Defender directory, it is possible that you do not have ownership of that folder. To fix the issue, take ownership of the folder and all its sub-directories in the Scans folder. It should open the Scans and other folders inside the Windows Defender directory.