Often when you want to troubleshoot issues or keep a general check on your system health in Windows 10, you have to use Event Viewer. Event Viewer shows all the Windows events that get logged such as Information, Errors, Warnings and so on. Besides errors, Windows logs completely normal activities. This makes it harder to spot events related to things that aren't working as expected. So from time to time you may need to clear the Event Log in Windows 10.
Clear All Event Logs in Windows 10 manually
You can manually clear any Event Log by right clicking it and choosing "Clear log..." from the right click menu.
- Right click the Start button or press Win + X to open the Win+X menu (Power User Menu) in Windows 10.
- Choose the item Computer Management from the context menu.
- Go to Computer Management - System Tools - Event Viewer - Windows Logs:
- Right click the log you would like to clear and select the command Clear Log... from the context menu:
You are done.
Clear All Event Logs in Windows 10 using Command Prompt
You can quickly clear all event logs using a special command. Do it as follows.
- Open an elevated command prompt.
- Type or paste the following command:
for /F "tokens=*" %1 in ('wevtutil.exe el') DO wevtutil.exe cl "%1"
This will produce the following output:
- Open an elevated command prompt.
- Type or paste the following command:
wevtutil el|more
It will produce the list of available logs.
Note the name of the log you need to clear.
- To clear a specific log, type the following command:
wevtutil.exe cl log_name_here
Replace the log_name_here portion with the name of the log you need to clear. For example, this will clear the "Application" log:
wevtutil.exe cl Application
How to clear all Event Logs using PowerShell
- Open PowerShell as administrator (see how).
- Type or copy-paste the following command into PowerShell:
wevtutil el | Foreach-Object {wevtutil cl "$_"}
- Press Enter. Wait for few seconds for all logs to be cleared. You can now exit PowerShell by typing Exit.
That's it.
Support us
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:
Very useful info thanks :)
You are welcome.
Sergey,
The article and the clearing event logs tricks are realy very useful!
Tell us please how to create PowerShell script file (*.ps1) using your command: wevtutil el | Foreach-Object {wevtutil cl “$_”}?
Save it as a ps1 file?
Excellent scrip.
I had to find a way to log clear all the logs on a Windows 2019 Server (Exchange server with under-provisioned C drive space, hence clearing it every 2 days), but used a different powershell script from technet, which was WAY more complicated than these commands. Id be interested if this would have worked on that server, as well as on a windows 10 computer. Does it work on Servers? if so, which versions? please and thank you.