How to Clear the Event Logs: 5 Ways to do it

You can manually clear the selected logs from the software

Reading time icon 4 min. read

Readers help support Windows Report. When you make a purchase using links on our site, we may earn an affiliate commission. Tooltip Icon

Read the affiliate disclosure page to find out how can you help Windows Report effortlessly and without spending any money. Read more

Key notes

  • You can clear event logs right from the application itself with just a few clicks.
  • More advanced users can try to clear event logs using the command line.
clear event logs

Event Log is the best way to keep track of issues on your PC, but many are wondering if it’s possible to clear event logs.

Clearing the log is one of the best Event Log practices, and in today’s guide, we will show you how to perform it properly.

Is it OK to clear event logs?

  • Yes, it’s perfectly fine to remove event logs, but you shouldn’t do it too frequently.
  • By doing so, you’ll minimize the number of logs, and you’ll be able to find current issues easier.
  • Do keep in mind that you don’t remove them too often because you might need them to fix a certain problem.
  • Clearing the logs may help when you get the Failed to transfer logged messages to event log error.

How can I clear event logs?

1. Use the manual method

  1. Open the Control Panel.
  2. Click on Administrative Tools in the System and Security window. You can also type event in the search menu and select View event logs.view event logs control panel
  3. Now you will need to be signed in as administrator and double click (left click) on Event Viewer.
  4. After opening Event Viewer, you will have a list of events you can access.event logs windows 10
  5. Right-click on the event you want to clear and then left on the Clear log.
  6. After you are finished with clearing the event logs close the Event log window, and you can go on with your work.

2. Use Command Prompt to clear a single event

  1. Open the start menu and type cmd.
  2. After it finds the cmd icon you will need to right click on it and select Run as administrator.
  3. You will need to type the following command: wevtutil elwevtutil el
  4. Now that you have the list of event logs in front of you, write down the one you want to clear.
  5. For clearing a specific event write down the command below followed by the name of the log, like this for example: wevtutil cl Error

3. Use the Command Prompt

  1. Open Notepad and paste the following text:
    @echo off
    FOR /F "tokens=1,2*" %%V IN ('bcdedit') DO SET adminTest=%%V
    IF (%adminTest%)==(Access) goto noAdmin
    for /F "tokens=*" %%G in ('wevtutil.exe el') DO (call :do_clear "%%G")
    echo Event Logs have been cleared!
    goto theEnd
    echo clearing %1
    wevtutil.exe cl %1
    goto :eof
    echo You must run this script as an Administrator!
  2. Save that text as .bat or .cmd file (Name the file with quotes to automatically save it as .cmd file, like ClearLog.cmd)
  3. Run .cmd file you just saved as the administrator clear event log windows 10
  4. Just let the command finish event log clear windows 10

That’s all, all your event logs are now cleared. This is probably the simplest way to clear all event logs in Windows 10, but if you want to try other ways, see how to do that below.

4. Use the PowerShell

  1. Go to Search, type powershell, right-click on PowerShell and choose Run as administrator.
  2. Enter the following line into PowerShell and press Enter:
    wevtutil el | Foreach-Object {wevtutil cl "$_"} event log clear windows 10 powershell
  3. Now just type Exit to close PowerShell window.

If you decide to use PowerShell to clear event logs, you’ll clear multiple logs in a matter of seconds.

5. Use the sing VBScript/WMI

  1. Open Notepad and enter the following text:
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate, (Backup, Security)}!" _
    & strComputer & "rootcimv2")
    Set colLogFiles = objWMIService.ExecQuery _
    ("Select * from Win32_NTEventLogFile")
    For each objLogfile in colLogFiles
  2. Save it as VBScript (.VBS), take a look at method 1 on how to save file as .vbs directly, name it, for example ClearEvent.vbs
  3. Move ClearEvent.vbs you just created to C:\Windows\System32
  4. Now open Command Prompt as administrator and run the following command:
    CScript ClearEvent.vbs event log clear windows 10

As you can see, these are just a couple of methods to remove logs on your PC.

If you’re looking for more powerful software, check our guide on the best event viewer software.

What method do you use to clear the event logs? Share it with us in the comments below.

More about the topics: event log viewers, windows 10 fix