ClearDefenderHistory
Script that allows you to clear the Windows Defender protection history on Windows 10 and 11 systems.
ClearDefenderHistory is a script that allows you to clear the protection history of Windows Defender (now called Windows Security) on Windows 10 and 11 systems. The script addresses the need to manually remove detection records and actions from the antivirus, something the default Windows Defender interface does not natively offer.
How It Works
The script creates a temporary scheduled task that is executed with SYSTEM privileges on the next reboot of the computer. This task clears the log files of Windows Defender located in folders such as C:\ProgramData\Microsoft\Windows Defender\Scans\History\Service. After execution, the task self-deletes, ensuring that the system returns to its normal state without further intervention.
Context and Need
- Security Change: Before spring 2024, it was possible to clear the history without rebooting the system. However, a Windows Defender security update rendered the previous method ineffective, now requiring a restart for the logs to be released and deleted.
- Reasons for Use:
- Simple Cleanup: Users may want to remove old detections to organize the history.
- Correction of False Positives: In some cases, Defender continues to show false positive alerts even after definition updates, and clearing the history may resolve this.
How to Use
- Download the ZIP file through the button above.
- Extract ClearDefenderHistory.cmd.
- Right-click the file, go to "Properties," check "Unblock" (if applicable), and click "OK".
- Run the script by double-clicking (you may need to approve User Account Control - UAC).
- Restart the computer when prompted to complete the cleanup.
Features
- Security: Uses SYSTEM permissions via scheduled task, avoiding risky methods such as manually changing the ownership of Defender folders, which could create vulnerabilities.
- Portability: Does not require installation, being executable directly.
- Effectiveness: Reliably removes logs, including files like mpenginedb.db and the contents of the history folder.
File security
0/63 engines flagged the file in the recorded scan.
Scan date: 12/22/2024
SHA-256: bbe6acb9e65fbfab5739eb427d8ba27511b2a9b7e4944bcc9f7e5002df4c1ed0
Found a problem on this page?Tell the team about broken links, versions or incorrect information.
Related
QontrolPanel 2.3.0
Custom audio panel for Windows that replaces or complements the system's standard sound controls.
SoundSwitch 7.3.3
Software that enables quick switching of audio devices in Windows.
Fastfetch 2.68.1
Command-line tool that provides system information.
Sandboxie 5.73.3
Install software and browse the web securely in an isolated
RisohEditor 6.1.9
Resource editor for Windows that allows you to create and modify resource files.
NTLite 2026.09.11904
Software that allows customization of Windows installations.
Grub2Win 3.0.3.9 Build 2013
Tool that facilitates the installation of multiple operating systems.
Win11Debloat 2026.08.24
Simplified bloatware removal script for Windows 11.



