Windows: Clear Event Viewer - Here's how
Windows stores a lot of information about your behavior in Event Viewer. Read how to clear the log in this article.
Windows 7/8: Clear event viewer manually
In the event log, for example, you will find information about software errors that have occurred, ongoing processes, the boot process or how long your computer has been in operation. You can delete this data at any time:
- Press the key combination [Windows] + [R] and enter the command "eventvwr".
- If necessary, confirm the warning of the user account control with "Yes".
- Now the event log opens. Use the categories on the left to navigate through all saved data.
- Select the "Delete log" option on the right and confirm with "Empty" to remove the data.
- Repeat step (4) for all categories.
Alternatively: Clear all event logs under Windows
If you do not want to remove the event logs individually, you can automatically empty them with a batch file. To do this, create a text document with the following content (see image) and rename the file to "Event Viewer.bat".
- @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.
- echo goto theEnd
- : do_clear
- echo clearing% 1
- wevtutil.exe cl% 1
- goto: eof
- : noadmin
- exit
Then right-click on the batch file and select the entry "Run as administrator". Then a console window opens, which automatically deletes all data.
How to always run the batch file as admin, read on the next page.