Windows 11/10 is known for acting up now and again with several types of errors. Now, you may want to get a deeper understanding of the errors, and that’s where the Event Log comes into play. Event Log files basically store all information regarding past errors for your viewing pleasure, and that’s great. The problem is, the Event Log at times doesn’t automatically remove all the information it stores, and that can be a problem for your computer’s performance.
To fix this, users must manually clear the Event Log, and you know what? Most computer users have no idea of how to do this. Worry not, we’re going to help you through the entire process, and when we’re done, you’ll be a master.
Clear the Event Log in Windows 11/10
This post shows you how to clear the Event Log files via the Event Viewer UI or the Command line. You can delete all or selected even log files also from your Windows/Server, by following the steps laid down in this tutorial.
1] Delete the Event Log using the Event Viewer
Click on the Start button then type eventvwr.msc or Event Viewer. When you see the icon, right-click on it and select Run as Administrator to launch the Event Viewer. Finally, double-click on the folders in the left pane, right-click on the events you want to have deleted and then choose Clear Log. This will all log files for that section. You may also select a log file and then click on Clear log which you see on the right-side panel.
2] Clear selected Event logs using the wevtutil tool
Personally, I love to use the Command Prompt instead of the regular ways of doing things. In that case, we’re going to talk about how to clear the Event Log using the Command Prompt before touching on the other option.
Click on the Start button, then type “cmd.exe” and from there you’ll see the CMD icon. Right-click on the icon then select Run as Administrator to fire up the Command Prompt.
The next step, then, is to type “wevtutil el” into the newly opened Command Prompt window and make sure to do this without the quotes. Click the Enter key on your keyboard and in a moment you should see a list of all the error logs.
Finally, type wevtutil cl + the name of the log you want to remove. This option allows you to clear only the ones you do not want, so don’t go in expecting it to clear everything at the same time.
WEVTUTIL.exe is a built-in tool that enables you to retrieve information about event logs and publishers. You can also use this command to install and uninstall event manifests, to run queries, and to export, archive, and clear logs.
3] Remove all Event Log files using a .CMD file
To clear everything, launch the Notepad software then copy and paste the following piece of information which has been sourced from MSDN:
@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 Event Logs have been cleared! ^<press any key^> goto theEnd :do_clear echo clearing %1 wevtutil.exe cl %1 goto :eof :noAdmin echo You must run this script as an Administrator! echo ^<press any key^> :theEnd pause>NUL
Be sure to save the data as a .CMD file, then finally, right-click on the saved file and select Run as Administrator. From there, the Command Prompt should launch by itself, and all you need to do is allow it to finish doing its stuff.
Hope this helps!
Related reads that are sure to interest you:
- How to view and delete Event Viewer Saved Logs in Windows
- How to view Event Logs in Windows in detail with Full Event Log View
- Use Event Viewer to check unauthorized use of Windows computer
- How to create Custom Views in Event Viewer on Windows
- Enhanced Event Viewer for Windows from Technet
- Event Log Manager Free event log management software
- Monitor Windows Event Log Files Checking with SnakeTail Windows tail utility
- Event Log Manager & Event Log Explorer software.