Windows 10: Clear All Event Logs in Event Viewer in Windows  

Page 1 of 4 123 ... LastLast
    Clear All Event Logs in Event Viewer in Windows

    Clear All Event Logs in Event Viewer in Windows

    How to Clear All Event Logs in Event Viewer in Windows
    Published by Category: Performance & Maintenance
    13 May 2017
    Designer Media Ltd

    Published by


    Brink's Avatar
    Administrator

    Posts: 20,755

    Show Printable Version 


    How to Clear All Event Logs in Event Viewer in Windows

    information   Information
    Event Viewer is a tool that displays detailed information as event logs about significant events on your PC.
    Event logs are special files that record significant events on your PC, such as when a user signs in to the PC or when a app encounters an error. Whenever these types of events occur, Windows records the event in an event log that you can read by using Event Viewer.

    Advanced users might find the details in event logs helpful when troubleshooting problems with Windows and other apps. However, you may also wish to be able to quickly clear all event logs at once as needed.

    This tutorial will show you how to quickly clear all event logs in Event Viewer as needed in Windows 10.

    You must be signed in as an administrator to be able clear all event logs.

    Note   Note
    This will not clear Analytic or Debug logs. If you have them enabled, the wevutl command returns an error, but all other logs will be cleared.


    CONTENTS:
    • Option One: To Clear All Event Viewer Logs using a BAT file
    • Option Two: To Clear All Event Viewer Logs in Command Prompt
    • Option Three: To Clear All Event Viewer Logs in PowerShell
    • Option Four: To Clear Individual Event Viewer Logs in Event Viewer



    EXAMPLE: Event Viewer
    Click image for larger version. 

Name:	Event_Viewer-2.png 
Views:	1259 
Size:	65.3 KB 
ID:	31597






    Clear All Event Logs in Event Viewer in Windows OPTION ONE Clear All Event Logs in Event Viewer in Windows
    To Clear All Event Viewer Logs using a BAT file

    1. Click/tap on the Download button below to download the .bat file below.

    Clear_Event_Viewer_Logs.bat

    download

    2. Save the .bat file to your desktop.

    3. Unblock the .bat file.

    4. Right click or press and hold on the .bat file, and click/tap on Run as administrator.

    5. If prompted by UAC, click/tap on Yes.

    6. A command prompt will now open to clear the event logs. The command prompt will automatically close when finished.






    Clear All Event Logs in Event Viewer in Windows OPTION TWO Clear All Event Logs in Event Viewer in Windows
    To Clear All Event Viewer Logs in Command Prompt

    1. Open an elevated command prompt.

    2. Copy and paste the command below into the elevated command prompt, and press Enter.


    for /F "tokens=*" %1 in ('wevtutil.exe el') DO wevtutil.exe cl "%1"


    3. The event logs will now be cleared. You can close the command prompt when it's finished.






    Clear All Event Logs in Event Viewer in Windows OPTION THREE Clear All Event Logs in Event Viewer in Windows
    To Clear All Event Viewer Logs in PowerShell

    1. Open an elevated Windows PowerShell.

    2. Copy and paste the command below you want to use into the elevated PowerShell, and press Enter.

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

    OR

    wevtutil el | Foreach-Object {wevtutil cl "$_"}


    3. The event logs will now be cleared. You can close PowerShell when it's finished.






    Clear All Event Logs in Event Viewer in Windows OPTION FOUR Clear All Event Logs in Event Viewer in Windows
    To Clear Individual Event Viewer Logs in Event Viewer

    1. Press the Win + R keys to open the Run dialog, type eventvwr.msc, and click/tap on OK.

    2. Select a log (ex: Application) that you want to clear in the left pane of Event Viewer, and click/tap on Clear Log in the far right Actions pane. (see screenshot below)

    Click image for larger version. 

Name:	Clear_log_in_Event_Viewer-1.png 
Views:	1056 
Size:	79.0 KB 
ID:	34994


    OR


    3. Right click or press and hold on a log (ex: Application) that you want to clear in the left pane of Event Viewer, and click/tap on Clear Log. (see screenshot below)

    Click image for larger version. 

Name:	Clear_log_in_Event_Viewer-2.png 
Views:	1319 
Size:	80.4 KB 
ID:	34995



    That's it,
    Shawn



  1. Posts : 510
    Windows 10 Pro 64bit; Windows 10 TP; KDE Neon
       15 Aug 2015 #1

    Thank you very much, Brink, for this new tutorial!

    I will present the results after applying the commands on my system.

    First of all, it has indeed cleared my Event Viewer logs:

    Click image for larger version. 

Name:	1.PNG 
Views:	356 
Size:	24.1 KB 
ID:	31608

    I used the command in CMD, which by the way I have been always using (I mean, even on Windows 7). It works fine! There was only one issue in my Windows 10 Pro, though:

    Click image for larger version. 

Name:	2.png 
Views:	655 
Size:	38.1 KB 
ID:	31610

    I have no idea what this "AirSpaceChannel" is... I have seen this error in my system other times, as well. I am always using a wired LAN Internet connection. Can you please tell me what is this?


    Then I run the command from the PowerShell:
    Click image for larger version. 

Name:	3.png 
Views:	290 
Size:	40.3 KB 
ID:	31612

    I think the results were expected, right?
    I just don't understand what the last failure is, the one about the USBvideo/Analytic... Is that expected, too?

    So, thanks Brink!

    I am REALLY-REALLY looking forward for a tutorial on how to clear the Reliability History
      My ComputerSystem Spec


  2. Posts : 14,911
    Microsoft Windows 10 Pro 64-bit 14393, Windows 10 Insider Fast Ring, Windows 8.1 Update, Ubuntu
       15 Aug 2015 #2

    For Windows logs and Application and Services logs, there is also the manual way to clear specific logs(only these 2 sections, custom views can be Deleted and lost, but not Cleared for example:
    Click image for larger version. 

Name:	Screenshot (3).png 
Views:	1028 
Size:	222.1 KB 
ID:	31614
    Click image for larger version. 

Name:	Screenshot (4).png 
Views:	716 
Size:	205.6 KB 
ID:	31615
      My ComputersSystem Spec


  3. Posts : 20,755
    64-bit Windows 10 Pro build 16199
    Thread Starter
       15 Aug 2015 #3

    Hey Joanne,

    Yeah, I have no idea what "AirSpaceChannel" is for either.

    That would be normal in Powershell for any of the Analytic or Debug logs.
      My ComputersSystem Spec

  4.    30 Aug 2015 #4

    Why is it that as the admin I still have to run the bat as admin for it to work; just wondering since on win 7 I just run it as is and it clears all logs. Tried this and would not clear without running using the "run as administrator". Thanks
      My ComputerSystem Spec


  5. Posts : 20,755
    64-bit Windows 10 Pro build 16199
    Thread Starter
       30 Aug 2015 #5

    Hello csmdew, and welcome to Ten Forums.

    It just needs to have elevated rights to be able to clear the event logs from the system.
      My ComputersSystem Spec


  6. Posts : 3
    Windows 10 Professional
       10 Dec 2015 #6

    Office 2016 includes the AirSpaceChannel


    It's Office 2016.

    Microsoft Office 2016 - AirSpaceChannel
    office 2016 airspacechannel - Google Search

    I know this is an older thread. Regardless, I wanted to post a note here just in case anyone else looks here as I did.

    Just FYI.
      My ComputerSystem Spec


  7. Posts : 20,755
    64-bit Windows 10 Pro build 16199
    Thread Starter
       10 Dec 2015 #7

    Thank you windowsnt, and welcome to Ten Forums.
      My ComputersSystem Spec

  8.    16 Jan 2016 #8

    Shawn, thanks a lot for the script.
    One more excellent job (like the life saver I just did with the Restore_Windows_Photo_Viewer one!!!).
    This one seems to be working perfectly, except from one thing, which I have highlighted in the picture.
    Do you have any idea what it is and how it can be fixed?

    Click image for larger version. 

Name:	ClearEventViewerLog.jpg 
Views:	345 
Size:	395.7 KB 
ID:	59181

    BR. Dimitri
      My ComputerSystem Spec


  9. Posts : 20,755
    64-bit Windows 10 Pro build 16199
    Thread Starter
       16 Jan 2016 #9

    Hello Dimitri,

    You might see if it may be able to clear it while running it in Safe Mode.

    https://www.tenforums.com/tutorials/2...dows-10-a.html
      My ComputersSystem Spec


 
Page 1 of 4 123 ... LastLast

Related Threads
Event Viewer -- Audit Failure 5061 in Performance & Maintenance
I continue to get this event in the Event Log under Audit Failure. I never had in Windows 8.1 and it started after upgrading to 10. Does anyone have a clue about it? Cryptographic operation. Subject: Security ID: SYSTEM Account...
Worried about event viewer errors in Performance & Maintenance
hi guys managed to install windows 10 and everything seems to be working great. I looked in event viewer and I'm getting loads of errors, the same over and over. one is that keeps coming up is kernel-power event id 137 The system...
Clearing event viewer entries in General Support
How can I construct a .bat file to clear entries in the event viewer. Thanks
TONS of errors in event viewer in Performance & Maintenance
I just clean installed my windows, and have not made any changes as to what would cause these errors.... but in event viewer, since install on the 29th, i have 800 errors and warnings. ive noticed on my other PC that i just installed 10 on...
I'm getting certain repeating errors in Event Viewer when I reboot my new Win Pro 64-bit (after yesterday's upgrade from Win 8.1 Pro 64-bit). Please see the details and post your thoughts here: ...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 22:26.
Find Us