Window 10 is one of those windows that automatically free up space, but on the other hand, the event viewer did not clear the data automatically.
In that case, you have to clean the data yourself.
In this blog, we will discuss the different methods to delete log files in windows 10.
How to Delete Win Log Files In Windows 10?
Method 1: Use Command Prompt
It is the Windows command-line utility tool is a tool that you can employ to perform any task in Windows with command lines.
Users can also utilize the command prompt for clearing the event viewer in Windows 10.
Follow the below steps to delete all window log files.
- Step: 1 – Go to the elevated command prompt. You can also go for the Windows search context menu, or use Ctrl + Shift + Enter to launch Run dialog cmd with admin privileges.
- Step: 2 – Open the event viewer default path using the (cd %windir%\system32\config) change directory command:
- Step: 3 – For clearing all the win log files, enter (del *.log /a /s /q /f) command and press Enter.
- Step: 4 – After performing the above action, all your files with .log extension will get deleted from your system.
And if you also want to clear individual log files, then follow the below steps.
- Step: 1 – Go for a different admin command prompt.
- Step: 2 – For listing the log files, enter (wevtutil el) command and press Enter
- Step: 3 – A list will be visible to you if you get a specific log file that you want to delete, enter (wevtutil cl <name of the log> command, and press Enter.
These steps will help you to delete the particular log from the Event Viewer file.
Method 2: Create A Command File To Automatically Clear Log Files
Whenever we try to experiment with some new features, there is a possibility that you end up generating many win log files on your computer if the feature fails. You may need to know how to delete win log files in Windows 10 automatically.
Use the command file to automate this process.
Follow the below steps to get success.
- Step: 1 – Go to the notepad or MS visual code for text editing.
- Step: 2 – You have to type this code
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! ^<press any key^>
echo clearing %1
wevtutil.exe cl %1
echo You must run this script as an Administrator!
echo ^<press any key^>
- Step: 3 – After entering this code, save the name for this command with the .cmd extension on a particular folder.
- Step: 4 – Launch this command file as an administrator by picking up the right option by clicking rite on the context menu.
- Step: 5 – After following the above steps carefully, all your log files will get removed automatically.
Note: Launch this file as an admin to remove event log files.
Method 3: Apply the Event Viewer GUI
The Event Viewer GUI in Windows 10 is very easy to operate through the settings. If you wish to go with the easy and simple way, go for the GUI to delete win log files in Windows 10.
Follow these below steps to run the event viewer and clear event logs in Windows 10:
- Step: 1 – Go for Run dialog.
- Step: 2 – Enter eventvwr.msc and click Ctrl + Shift + Enter to start the Event Viewer as an admin.
- Step: 3 – From the leftmost pane, extend the folders by tapping on the little sign next to the folder.
- Step: 4 – In the table of records, select the entry from the central pane and tap on Clear Log from the action the section in the rightmost pane.
- Step: 5 – You can also go for the Shift key to choose a series of entries in the middle pane.
- Step: 6 – Again, apply these steps for all those entries that you want to delete.
Method 4: Use Third Party Applications
Many third-party cleaner applications are available that can remove temporary files and different junk files in Windows 10. Using third-party applications for clearing up the event log files.
One of the widely used applications is CCleaner, which can help you clean all junk files on your computer for free.
If you need more robust file deletion software, you can also go for premium alternatives like BitRaser for File and its options.
- How To Get Unbanned From Tinder 2020
- How To Recover Deleted Emails Gmail 2020
- How to Permanently Delete Your Roblox Account
- How To Watch Deleted YouTube Videos 2020
- How To See Deleted Messages On Discord 2020
In this blog, we have seen how and where the event log directory is located and also how to delete win log files in Windows 10 by applying the above techniques.