2 Ways You Can Clear Protection History in Windows 11

by Kazim Ali Alvi
Kazim Ali Alvi
Kazim Ali Alvi
Author
Kazim has always been fond of technology, be it scrolling through the settings on his iPhone, Android device, or Windows. And at times, unscrewing the device to take... read more
Affiliate Disclosure
  • Protection history is a log of the actions taken by Windows Defender or any critical services that are not running, but it's imperative that you clear it from time to time.
  • Clearing the protection history will help clear storage space and also improve the performance of Windows Defender.
  • Here, you can find out how to clear protection history using the File Explorer and Event Viewer.
Learn how to clear protection history in Windows 11

XINSTALL BY CLICKING THE DOWNLOAD FILE
To fix various PC problems, we recommend Restoro PC Repair Tool:
This software will repair common computer errors, protect you from file loss, malware, hardware failure and optimize your PC for maximum performance. Fix PC issues and remove viruses now in 3 easy steps:

  1. Download Restoro PC Repair Tool that comes with Patented Technologies (patent available here).
  2. Click Start Scan to find Windows issues that could be causing PC problems.
  3. Click Repair All to fix issues affecting your computer's security and performance
  • Restoro has been downloaded by 0 readers this month.

When your PC is running low on storage, there are a lot of folders you immediately look into to free up space. One of these that consumes a large portion is the Windows Defender protection history, but can you clear it in Windows 11?

Though not entirely necessary, deleting the protection history actually helps clear some storage space on the system. For some users, these files took 20-25 GB of space, and that can be intimidating if your computer is running low on storage.

So, let’s find out what is protection history, all the ways you clear it in Windows 11, and how to configure it to clear automatically after a set period of time.

What is Protection History?

Microsoft offers a built-in antivirus, Windows Defender, to keep your system secure and free from any threats and viruses.

In order to achieve that, Windows Defender will run regular scans in the background, given it is enabled, and keep a log of problems that it identifies, along with the actions taken. It will list out the potentially unwanted apps that were blocked or removed, or if any critical services are turned off.

These logs or the information are referred to as the Windows Defender Protection History or simply Protection History. It categories the problems based on their severity level. Remember, you need to have administrator privileges to view the details of these actions.

Now that you have a fair understanding of the process, let’s walk you through the ways you can clear the protection history in Windows 11.

How do I clear protection history in Windows 11?

1. Use the File Explorer

  1. Press Windows + E to launch the File Explorer, paste the following path in the address bar at the top, and hit Enter. Alternatively, you can navigate this path as well, just make sure to make the hidden files visible:C:\ProgramData\Microsoft\Windows Defender\Scans\History\ServicePaste path
  2. Once there, press Ctrl + A to select all the files, and hit Delete to clear them.Delete to how to clear protection history windows 11
  3. Choose the appropriate response in case a confirmation prompt pops up.
  4. Now, go to this path:C:\ProgramData\Microsoft\Windows Defender\Scans
  5. Locate the mpenginedb.db file, right-click on it and select the Delete icon from the context menu.Delete file to fix how to clear protection history windows 11
  6. Again, choose the appropriate response if a confirmation prompt appears.
  7. Once done, press Windows + S to launch the Search menu, enter Windows Security in the text field, and click on the relevant search result.Windows Security
  8. Click on Virus & threat protection from the options here.Virus & threat protection to Locate the mpenginedb.db file, right-click on it, and select the Delete icon from the context menu.
  9. Next, click on Manage settings under Virus & threat protection settings.Manage settings
  10. Click on the toggle for Real-time protection to disable it.disable Real-time protection to how to clear protection history windows 11
  11. Click Yes in the UAC (User Account Control) prompt that pops up.Click Yes
  12. Similarly, disable Cloud-delivered protection under it.Disable cloud delivered protection to how how to clear protection history windows 11
  13. Wait for a few moments, and then re-enable both the features.Re-enable both

The protection history in Windows 11 has been successfully cleared. Also, you now know the Windows Defender History location on the PC, and can easily delete it the next time onwards.

2. Via Event Viewer

  1. Press Windows + S to launch the Search menu, enter Event Viewer in the text field, and click on the relevant search result.Event viewer
  2. Double-click on Applications and Services Logs in the navigation pane on the left.Applications to services logs to fix how to clear protection history windows 11
  3. Now, expand Microsoft to view the options under it.Microsoft
  4. Next, double-click on Windows.Windows
  5. Expand Windows Defender and click on the Operational entry under it.windows defender
  6. Click on Clear Log on the right.Clear log to how to clear protection history windows 11
  7. Now, select the appropriate response from the confirmation prompt depending on whether you want to save its contents or delete it completely. We recommend the latter.Confirm change to how to clear protection history windows 11

This is how you clear protection history in Windows 11 using the Event Viewer. The method is relatively simple and far more efficient for those who regularly check the error logs in Windows 11.

Both these methods help manually clear protection history, but what if you want it to be cleared automatically? There are a couple of ways to do that. Read the next section to find out.

How do I set the protection history to clear automatically?

1. Use Windows PowerShell

  1. Press Windows + R to launch the Run command, enter wt in the text field, press and hold the Ctrl + Shift key, and either click on OK or hit Enter to launch an elevated Windows Terminal.terminal
  2. Click Yes in the UAC prompt that pops up.Click Yes
  3. Now, paste the following command in the PowerShell tab and hit Enter to execute it. Just make sure to replace N here with the number of days after which you want the protection history to be automatically cleared.Set-MpPreference -ScanPurgeItemsAfterDelay N
  4. For instance, if you want the protection history to be cleared automatically after 7 days, the command becomes as follows:Set-MpPreference -ScanPurgeItemsAfterDelay 7Execute command to how to clear protection history windows 11

Expert Tip: Some PC issues are hard to tackle, especially when it comes to corrupted repositories or missing Windows files. If you are having troubles fixing an error, your system may be partially broken. We recommend installing Restoro, a tool that will scan your machine and identify what the fault is.
Click here to download and start repairing.

This is probably the easiest method to automatically clear protection history in Windows 11 using PowerShell. But in case you are not a big fan of the command line, try the next method.

2. Use Local Group Policy Editor (Gpedit)

  1. Press Windows + R to launch the Run command, enter gpedit.msc in the text field, and either click OK or hit Enter to launch the Local Group Policy Editor.gpedit
  2. Expand Administrative templates and then double-click on Windows Components.double-click
  3. Next, double-click on Microsoft Defender Antivirus and then on Scan under it.Expand
  4. Double-click on the Turn of removal of items from scan history folder policy here.turn on removal of items from scan history folder to how to clear protection history windows 11
  5. Select Enabled from the top, enter the number of days before the history is deleted, and then click OK at the bottom to save the changes.Enable policy

That’s it! The protection history will now automatically be cleared after the set number of days. In case you want to keep the protection history forever, enter 0 in the field for the number of days.

In case you are running the Home Edition of the OS, learn how to install Local Group Policy Editor in Windows 11.

Is it safe to clear the protection history in Windows 11?

There’s no harm in clearing the protection history in Windows 11 and it certainly wouldn’t affect the functioning of the PC in any way. More so, these files appear in Disk Cleanup if you run a scan.

And it doesn’t matter whether Windows Defender is now disabled and you are using a third-party antivirus, you can still clear the old log files.

Also, if the files have accumulated over time and their size has increased considerably, it could cause a crash each time you open Windows Defender protection history. All the more reasons to clear protection history

That’s all there is to the concept. Also, the methods listed here would help manually clear the Windows Defender protection history in Windows 10 as well.

In case the Virus & threat protection is not working, learn how to fix it since the issue is common, and without it, you wouldn’t be able to access the protection history through Windows Defender.

Besides, if your PC is running low on resources, you may consider disabling Antimalware Service Executable (Windows Defender process), since it’s known to hog the system resources.

If you have any queries, drop a comment in the section below.

idee restoro Still having issues? Fix them with this tool:
  1. Download this PC Repair Tool rated Great on TrustPilot.com (download starts on this page).
  2. Click Start Scan to find Windows issues that could be causing PC problems.
  3. Click Repair All to fix issues with Patented Technologies (Exclusive Discount for our readers).

Restoro has been downloaded by 0 readers this month.

This article covers:Topics: