When your PC is running out of storage space, you can instantly view many folders to free up space. One of them that consumes a big part is Windows Defender protection history, but can you clear it in Windows 11?
Although not entirely necessary, deleting protection history can actually help clear some storage space on your system. For some users, these files take up 20-25 GB of space, which can be daunting if your computer is low on storage space.
So, let’s find out what protection history is, all the ways to clear it in Windows 11, and how to configure it to clear automatically after a set time.
What is historical preservation?
Microsoft provides built-in antivirus software Windows Defender to keep your system safe and protected from any threats and viruses.
To achieve this, Windows Defender will run periodic scans in the background, if it is enabled, and log the issues it identifies and the actions it takes. It will list potentially unwanted apps that have been blocked or removed, or if any critical services have been turned off.
These logs or information are called Windows Defender protection history or simply protection history. It classifies problems based on their severity. Keep in mind that you need administrator privileges to view the details of these operations.
Now that you have a decent understanding of the process, let us walk you through how to clear protection history in Windows 11.
How to clear protection history in Windows 11?
1. Use File Explorer
- Press Windows E to start File Explorer and change the following Paste the path into the address bar at the top and hit Enter. Alternatively, you can navigate this path, just make sure to make the hidden files visible:
<strong>C:\ProgramData\Microsoft\Windows Defender\Scans\History\Service</strong>
- Once there, press Ctrl A to select all the files, then hit Delete to clear them.
- If a confirmation prompt pops up, please choose the appropriate response.
- Now, go this route
<strong>:C:\ProgramData\Microsoft\Windows Defender\Scans </strong>
- Findmpenginedb.db file, right-click on it and select the Delete icon from the context menu.
- Likewise, if a confirmation prompt appears, choose the appropriate response.
- When finished, press Windows S to launch the search menu, enter Windows Security in the text field, and click on the relevant search result.
- Click Virus & Threat Protection from the options here.
- Next, click Manage Settings under Virus & Threat Protection Settings.
- Click the toggle button for Real-time Protection to disable it.
- Click Yes on the pop-up UAC (User Account Control) prompt.
- Likewise, disable Cloud-provided protection under it.
- Wait a moment and then re-enable both features.
Protection history in Windows 11 has been cleared successfully. Additionally, you now know where Windows Defender history is on your PC and can easily delete it next time.
2. Via Event Viewer
- Press Windows S to launch the search menu and enter Event Viewer## in the text field # and click the relevant search results.
Double-click - Applications and Services Logs in the left navigation pane. <strong></strong>
Now, expand - Microsoft to see the options below it.
Next, double-click - Windows.
Expand - Windows Defender and click the Operational entry below it.
Click - on the right to clear the log. <strong></strong>
Now, choose the appropriate response from the confirmation prompt depending on whether you want to save its contents or delete it completely. We recommend the latter.
Here's how you clear protection history using Event Viewer in Windows 11. This method is relatively simple and more efficient for those who regularly check the error logs in Windows 11.
Both methods help to clear protection history manually, but what if you want to clear it automatically? There are several ways to do this. Read the next section to find out.
How to set protection history to clear automatically?
1. Use Windows PowerShell
Press - Windows R to start the run command and enter wt## in the text field #, hold down the Ctrl Shift key, and click OK or hit Enter to launch an elevated Windows Terminal. <strong></strong>Click
Yes in the pop-up UAC prompt. -
<strong></strong>Now, paste the following command into the
PowerShell- tab and hit Enter to execute it. Just make sure to replace the N here with the number of days you want your protection history to be automatically cleared. Set-MpPreference -ScanPurgeItemsAfterDelay N
<strong></strong>
For example, if you want the protection history to be automatically purged after 7 days, the command is as follows:
- Set- MpPreference -ScanPurgeItemsAfterDelay 7
<strong></strong>
Expert Tip:
Some PC problems are difficult to solve, especially if the repository is corrupted or Windows files are missing . If you are having trouble fixing errors, your system may be partially corrupted. We recommend installing Restoro, a tool that can scan your machine and determine where the fault lies. Click here to download and start repairing.
This is probably the easiest way to automatically clear protection history in Windows 11 using PowerShell. But if you're not a big fan of the command line, try the next method.
2. Use the local Group Policy Editor (Gpedit)
- Press Windows R to start the run command and enter gpedit . msc in the text field and click OK or click Enter to launch the Local Group Policy Editor.
- Expand Administrative Templates and double-click Windows Components.
- Next, double-click Microsoft Defender Antivirus and then Scan under it.
- Double-click the "Remove items from scan history folder" policy here .
- Select Enable from the top, enter the number of days before history will be deleted, and click OK at the bottom to save changes.
That's it! Protection history will now be cleared automatically after a set number of days. If you want to keep the protection history permanently, enter 0 as the number of days in the field.
If you're running the Home edition of the operating system, learn how to install Local Group Policy Editor in Windows 11.
Is it safe to clear protection history in Windows 11?
There is no harm in clearing protection history in Windows 11, and it certainly won’t affect the functioning of your PC in any way. What's more, these files will show up in Disk Cleanup if you run a scan.
And regardless of whether Windows Defender is now disabled and you are using third-party antivirus software, you can still clear old log files.
Additionally, if files have accumulated over time and their size has increased significantly, it may cause a crash each time you open Windows Defender Protection History. More reasons to clear your protected history
That’s what this concept is all about. Furthermore, the methods listed here also help to clear Windows Defender protection history in Windows 10 manually.
If virus and threat protection isn't working, learn how to fix it because the problem is common and without it, you won't be able to access protection history through Windows Defender.
Also, if your PC is low on resources, you may consider disabling the Antimalware Service Executable (Windows Defender process) as it is known to consume system resources.
The above is the detailed content of How to clear protection history in Windows 11: 2 methods. For more information, please follow other related articles on the PHP Chinese website!