Home » How To » How to Clear Windows Defender Protection History

How to Clear Windows Defender Protection History

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.

C:\ProgramData\Microsoft\Windows Defender\Scans\History\Service

Select all the files in the Service folder by pressing the Ctrl + A. Next, delete them by pressing the Delete key on your keyboard.

select all the files to clear the defender protection history

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.

open Command Prompt as admin

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.

run the command to clear the Windows defender protection history

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.

Related tutorials:

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top