How to delete Win log files in Windows 10

How to delete Win log files in Windows 10

How to delete Win log files in Windows 10? Storage space in Windows 10 gets used up really quickly, and you may be undecided about the files you should delete to free up space.

Have you considered deleting the win log files in Windows 10 so you can free up some space? Win log files are stored as recorded every time Windows does a noteworthy operation or when some program error occurs on your computer.

These records are stored for troubleshooting purposes in the Windows directory.

The storage path for Win log files is usually “C:\Windows\System32\winevt”, but in some computers, the path can be something like “C:\Windows\System32\config”.

The mentioned log files are usually large and may take up too much space on your hard disk drive. So, deleting them may be the best thing to do to free up space on your Windows 10 PC.

Throughout this article, we will be checking out some of the methods you can use to delete Win log files in Windows 10.

Table of Contents

  1. How to delete win log files in Windows 10
    1. Use the Windows 10 Event Viewer
    2. Delete log files in Windows 10 using Command Prompt
    3. Win log files delete with .CMD File
    4. Delete log files in Windows 10 using a third-party app
  2. Wrap Up

How to delete win log files in Windows 10

Use the Windows 10 Event Viewer

You can delete log files on Windows 10 using the Event Viewer. The steps to use Event Viewer are straightforward and highlighted below:

  • STEP 1: At the same time, hit the Windows key + “R”. The Run window pops up on the screen and in the box, type “eventvwr.msc”;
How to delete win log files in Windows 10

  • STEP 2: Press the “Enter” key, and the Event Viewer will be run as administrator on your PC;
  • STEP 3: On the left pane, expand the drop-down menu and click on one of the categories;
How to delete win log files in Windows 10

  • STEP 4: Mark the entries in the middle pane and navigate to the next pane on the right. Click on “Clear log”;
How to delete win log files in Windows 10

  • STEP 5: You can also clear the log by right-clicking on one of the folders on the left pane, such as “Security”. Once you right-click, select “Clear log”.

Delete log files in Windows 10 using Command Prompt

The Command Prompt is present on every Windows PC and it can be used to carry out various tasks. One possible use is to delete Win log files. Check the following steps to find out how:

  • STEP 1: Access “Search” on your Windows 10 taskbar and type “Command prompt” into the search box;
  • STEP 2: From the search result, run Command Prompt as administrator;
  • STEP 3: Type in the commands below, and after each command, press “Enter”:

cd/

cd windows

del *.log /a /s /q /f

How to delete win log files in Windows 10

Entering those lines of command will delete all your Win log files. If you, however, want to delete log files individually, follow the steps below:

  • STEP 1: Access “Search” on your Windows 10 taskbar and type “Command prompt” on the search box;
  • STEP 2: From the search result, run Command Prompt as administrator;
  • STEP 3: Type “wevtutil el” and press the “Enter” key to display all the logs;
  • STEP 4: Type in “wevtutil cl” and the name of the log you would like to delete;
  • STEP 5: Press the “Enter” key, and the log file will be removed.

Win log files delete with .CMD File

This is another method you can use to delete Win log files. Following the steps highlighted below should get the job done:

  • STEP 1: Launch the Notepad app:
  • STEP 2: Below is a set of codes that you will need to copy and paste in notepad:

@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

  • STEP 3: Save the text file to a .CMD file and run as administrator.

Delete log files in Windows 10 using a third-party app

A lot of applications and programs have been developed for Windows 10 for the sole purpose of freeing up storage space. These programs can be used to delete various files from junk files to temporary files and also log files.

You can search through the Microsoft Store to search for various cleaners. You can also search the internet for cleaning programs that can delete log files in Windows 10.

A well-known and trusted app you can try is CCleaner.

Wrap Up

This article gets you through simple steps on how to delete Win log files Windows 10. Any of the four mentioned here will do the job, and with those, you can free up a lot of storage on your hard disk drive.

Check out some of our other awesome articles: