How to Clear All Event Logs in Windows 10

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.

windows-10-event-log-appThe System Log and the Application Log are two of the important logs that you may want to clear occasionally. There are several ways to do it.

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.

  1. Right click the Start button or press Win + X to open the Win+X menu (Power User Menu) in Windows 10.
  2. Choose the item Computer Management from the context menu.
  3. Go to Computer Management - System Tools - Event Viewer - Windows Logs:
  4. 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.

  1. Open an elevated command prompt.
  2. 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:

All Windows logs will be cleared. Instead, you might want to clear individual logs. Do it as follows.

 

    1. Open an elevated command prompt.
    2. 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

  1. Open PowerShell as administrator (see how).
  2. Type or copy-paste the following command into PowerShell:
    wevtutil el | Foreach-Object {wevtutil cl "$_"}

  3. 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:

If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!

Author: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.

6 thoughts on “How to Clear All Event Logs in Windows 10”

  1. 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 “$_”}?

  2. 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.

Leave a Reply

Your email address will not be published.

Exit mobile version
Using Telegram? Subscribe to the blog channel!
Hello. Add your message here.