Clear Windows Event Viewer Logs

Clear Event Viewer Logs

how to erase the log files

Way 1. Clear All Event Logs in Event Viewer

Step 1. Press Win + R keys to open the Run dialog box, and then type eventvwr.msc in it and hit Enter.

open Event Viewer via the Run box

Step 2. Expand the Windows Logs category from the left sidebar, and then right-click a log (ex: Application) and select Clear Log.

select Clear Log in Event Viewer

Step 3. Click on Clear in the pop-up confirmation window.

click on Clear in the Event Viewer window

Here’s how to clear all event logs Windows 11. Also, you can try the following 4 methods.

Way 2. Clear Event Logs Using Command Prompt

Step 1. Type cmd in the search box, and then right-click the Command Prompt from the top result and select Run as administrator. Then click on Yes in the UAC window to confirm it.

open an elevated Command Prompt window

Step 2. In the elevated Command Prompt, type the following command and hit Enter.

for /F “tokens=*” %1 in (‘wevtutil.exe el’) DO wevtutil.exe cl “%1”

clear all event logs using the elevated Command Prompt

Once you clear all event logs Windows 11, you can close the Command Prompt window.

Way 3. Clear Event Logs Using Windows PowerShell

In addition to using Command Prompt, Windows PowerShell can help you clear event logs in Windows 11/10. Here’s how:

Step 1. Type powershell in the search box, and then right-click Windows PowerShell from the top result and select Run as administrator. Then click on Yes in the UAC window.

Step 2. In the elevated PowerShell window, type the following command and hit Enter to clear all event logs. Once done, close Windows PowerShell.

Get-EventLog -LogName * | ForEach { Clear-EventLog $_.Log }

clear event logs via Windows PowerShell

Way 4. Clear Event Logs Using a BAT File

You also can clear event logs in Windows 11/10 directly using a BAT file. For that:

Step 1. Clear here to download the Clear_Event_Viewer_Logs.bat file and save it to your desktop.

Step 2. Double click the bat file and click on Run in the pop-up window to unblock the file.

Step 3. Right-click the .bat file and select Run as administrator. Click on Yes if you are prompted by UAC. After that, an elevated Command Prompt will start clearing the event logs. Once finished, the Command Prompt window will automatically close.

run clear event logs bat file as administrator

How to clear all event logs Windows 11/10? The top 4 methods have been illustrated. Now, it’s your turn to have a try.

thanks to:

https://www.partitionwizard.com/partitionmanager/clear-all-event-logs-in-event-viewer.html

CALL FOR APPOINTMENT
Verified by MonsterInsights