How To Delete Win Log Files In Windows 10

You are running out of disk space on Local Disc (C:). To free space on this drive by deleting old or unnecessary files, click here…”

How To Delete Win Log Files In Windows 10 1
Low Disk Space Message

We all must have seen a window popping up with the above message on it at times when we try to store some more data to the drive. When the system’s C drive is full, you’re likely to witness the following changes in your system:

  • The windows OS will slow down.
  • Availability of low storage space; probably not enough to install Windows Update.
  • Program installation is not available.

When the C drive is full in Windows 10, its shown in red as below:

How To Delete Win Log Files In Windows 10 2

But, why does the drive keep filling up unnecessarily?

Following are the answers to the above question:

  1. In order to meet the performance parameters and reduce the loading time, windows tend to generate many temporary files. Some of these can’t be removed automatically resulting in these files taking up the storage space.
  2. A lingering virus or malware is indeed the biggest suspect. These malicious files are programmed to multiply on a certain input, and these eventually eat up the hard disk space.
  3. Many System Restore files are also responsible for taking your system’s disk space.

All the above reasons could be the hosts to a plethora of errors showing up in Windows. 

Windows keeps a record of these errors in WINDOWS EVENT LOG.

What is the Windows Event Log?

A log is basically the digital exhaust of all the events occurring on Windows. 

Win Log is a complete record of system, security and application notifications stored by the Windows OS that could be used to detect and diagnose system problems.

However it’s really important to clear these files for 2 major reasons:

  1. This event log can end up saving a lot of information leading to a reduced storage space. 
  2. These files represent privacy concerns.

Before we dive into various methods to remove the Win Log Files from our PC, let’s know about the locations where these files are stored in our PCs. There are two main folders depending on your system, where you can find these files:

  • %windir%\System32\Winevt\Logs\
  • %windir%\System32\config\

Windows is infamous for filling up the storage .So far we’ve come across the fact that the Win Log Files do play a subsequent role in taking up space on a cramped hard drive. The next segment lists various methods using which you can delete the Win Log Files from your system.

How To Delete Win Log Files In Windows 10?

1.Using Command Prompt:

  • Press Ctrl + Shift + Enter to launch the command prompt. You can even do so from the Windows search Context Menu.
  • Enter cd %windir%\system32\config in the cmd window, to go to the event viewer default path.
  • Type del *.log /a /s /q /f in the cmd window and press enter to delete all the Win Log Files.
How To Delete Win Log Files In Windows 10 3

All the files with a .log extension will be deleted from your system. In case you want to remove individual log files, the following steps are required:

  • Open another admin command prompt.
  • Type wevtutil el to list all the log files in your system.
How To Delete Win Log Files In Windows 10 4
  • Type wevtutil cl <name of the log> to delete the files individually as per your requirement.
How To Delete Win Log Files In Windows 10 5

There you are! 

That particular log from the Event Viewer is deleted. Here are some extra command prompt details like 12 Windows Command Prompt Tricks That Will Make You Feel Like A Genius.

2. Use The Event Viewer GUI:

In Windows 10, the Event Viewer GUI is very easy to navigate through the settings and is an alternative to the command prompt method of removing the Log Files.

  • Open a Run Dialog
  • Type eventvwr.msc and then press Ctrl + Shift + Enter to launch the Event Viewer with admin rights.
  • Click the small arrow next to the folder icon in order to expand the folders.
  • Select the entry from the middle pane in the list of entries and click  Clear Log from the action section in the rightmost pane.

Tap to see the entire process.

  • Repeat the  above steps for all the entries you want to delete.

Note- You can use the Shift key to select a range of entries in the middle pane.

How To Delete Win Log Files In Windows 10 6

3. PowerShell Clear All Event Logs:

  • Open Power-shell as an admin. You can do this from the start menu or the Winx Menu.

Note- If you haven’t replaced Power-shell with CMD in windows, follow the above step.

  • Type wevtutil el | Foreach-Object {wevtutil cl “$_”} and press enter.

 This will clear all the log files on your system.

How To Delete Win Log Files In Windows 10 7

4. Make A Command File To Automatically Clear Log Files:

  • Open a text editor like Notepad or MS visual Code.
  • Type the following code in the editor:

@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

How To Delete Win Log Files In Windows 10 8
  • Save the name of this command with a .cmd extension in any location of your preference.
  • By choosing the correct option from the right-click context menu, Run this command file as administrator.

A command prompt will open and all the log files will be cleared automatically.

5. Clearing Log files with CCleaner:

  • You can easily scan for Windows and App log files, and delete them if you use the CCleaner, which is a drive maintenance program.
  • Open the CCleaner program – 1. Cleaner menu opens 2. Click windows tab 3. Scroll down.
  • Click the checkbox marked as Windows Log Files and select Run Cleaner.
  • After the system is analysed for the files which can be cleared, click the button again to remove the Win Log files.

So there you have it!

These were the 5 methods using which you can remove the Win Log files and free up your system’s space.

How To Delete Win Log Files In Windows 10 17
Shivangi Kaushik
She's a final year electronics and communication engineering student from Uttar Pradesh. A gregarious and outgoing personality since childhood , who enjoys interacting with people and is always open to a healthy discussion on any topic. She's affable and confident enough to share her perspective and is a keen listener. Being an ex ICSE student, communicating and writing came naturally to her, which helped her write for various technical and non technical pages on the social media platforms and websites. . She has been actively volunteering and participating in various zonal and state level technical and literary events. Music is the ultimate soothing factor in her life and she likes to paint and sketch in her free time. She sights an exciting and stable career in the fields of Marketing and Public Relations in future.

Grab your lifetime license to AI Image Generator. Hostinger Hosting

X