How to Delete Win Log Files in Windows 10 - 3 Different Ways
How to

How to Delete Win Log Files in Windows 10 – 3 Different Ways

How to Delete Win Log Files in Windows 10 – 3 Different Ways

Windows log files are the files generated by windows or other applications to store information and record system operations and significant errors which are encountered by windows and programs.

Although the win log files help your computer to collect data for troubleshooting. But if you want to delete the Windows log files which are stored on your PC, then I am here to solve your problem.

Read Also: HOW TO GET STEAM TO RECOGNIZE GAME FILES?

I have given three methods in detail and in very easy steps. These methods can be easily performed by any user having some information about computers and windows.

#1: Event Viewer

1. Open the Run dialog box by either searching from Start or just by pressing Win + R.

2. Type there eventvwr.msc and then press Ctrl + Shift + Enter to open it as an Administrator.

How to Delete Win Log Files in Windows 10

3. On the Event Viewer window, click on the arrow with the option available in the left pane to expand options.

How to Delete Win Log Files in Windows 10

4. There will be categories like Application, Security, Hardware Events, etc. Right-click on a category and click on Clear Log.

How to Delete Win Log Files in Windows 10

5. Repeat this process one by one for each category to delete all the win log files.

This method has the most probability to work. It will be better to do by this method but if you find it difficult move to the next methods.

#2: Command Prompt

Command Prompt is a command-line text-based interface in windows operating systems that is used to give commands to the computer to perform most of the functions which can’t be performed by any other method.

Now, I have given the method for how you can delete win log files with the command prompt.

1. On the search bar, type cmd, and press Enter.

2. Right-click on the CMD (Command Prompt) and then click on Run as Administrator.

OR

Open Run by pressing Windows + R keys and then type cmd, then use Ctrl + Shift + Enter keys to open the command prompt as an administrator.

3. Type cd/ and press Enter.

4. Similarly, type cd windows and del *.log /a /s /q /f commands. Don’t forget to press Enter after each command.

Following this procedure may delete all your log files or it can delete most of the files. If it deletes some files which you can see from Event Viewer, then you should delete the rest files manually in Event Viewer.

#3: Make a cmd File

In this procedure, we make a .cmd file, and then we run it as an Administrator.

1. First of all, open a text editor. In windows, notepad is a default text editor installed. Open it.

2. Copy the following code and paste it into the text editor.

  • @echo off
  • FOR /F “tokens=1,2*” %%V IN (‘bcdedit’) DO SET adminTest=%%V
  • IF (%adminTest%)==(Access) goto admin
  • 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

3. Now, click on File on the top-left corner of the Notepad.

4. Then, click on Save As.

5. In the Save As Type field, just right below the name field. You’ll see an arrow, expand to get options and select All Files.

6. Type the name as a command. cmd and hit Enter to save the .cmd file.

7. Go to the location where your .cmd file is saved and run it as an administrator.

Complete the process, this process also deletes most of the log files.

Third-party apps

There are many apps available on the internet to help you manage all the extra files which are taking space on your storage and are of no use. Such Apps enable you to remove temp files, win log files, and junk files on your computer.

Even, many antivirus software contains the function of cleaning junk files some extra files like temp files, etc. You can do this with the help of antivirus if it is installed on your PC with this function.

Some Apps which can help you to delete all such files include CC cleaner, PC cleaner, and many other apps are also available that can optimize your PC. You can easily find the apps on the internet.

Conclusion

If you want to delete windows log files just to refresh the processor for any other reason, it is very easy to do in just a couple of minutes. The methods written in this article are very easy to understand.

I explained it and you will not have any kind of problem while deleting the windows log files. You can check out many other solutions on my website.

About the author

Stephen Hawken

Leave a Comment