Deleting log files in Windows 11 or 11 is a great way to free up hard drive space. But how to delete Windows log files? In this post, you will be introduced four simple ways to safely and quickly delete the log files in Windows.
Windows log files, also known as Win log files, are saved with the file extension ".log" and usually can be found on C:\Windows\System32\winevt or C:\Windows\System32\config (depending on Windows versions).
They come from Windows and some applications when need to record a significant error or a noteworthy operation on your computer for detailed troubleshooting and often require a dedicated program to view the data recorded within them.
However, these log files may be large and take up much hard drive space. To free up disk space, you may choose to delete them. But how to delete Windows log files? Before we proceed with the operation to erase log files in Windows, let's answer the following two questions first.
The answer is positive. Log files are for when things go wrong. When your system is running perfectly, you can delete your logs to save a bit of space. And the latter context will show you how to make it.
It's a safe process to do so. Removing log files in Windows won’t cause any harm to your software or hardware. And your personal files won’t be deleted either during the process. As long as you use the right tool, you can definitely delete them safely.
When you decide to remove log files, there are four simple methods for you to choose from. Read them one by one, and select the most convenient one for you to start the deletion task.
Event Viewer is handy to clear Win log files in that it displays events in the log. You can clean one log or clear your event logs all at once. Follow the guide below to see how to delete log files in Windows 10 with the Event Viewer:
Step 1. Press Win + R to open the Run window, input eventvwr.msc and press Enter to run Event Viewer as administrator.
Step 2. Expand Windows Logs on the left pane and click one category.
Step 3. Select the entries from the middle pane. To choose a range of entries, you can press Ctrl + Shift + Enter. And then, click Clear Log from the right pane.
Command Prompt is the command-line utility in Windows that can be used to delete files including force deleting corrupted folders, cleaning temp files, or deleting Win log files. Just follow the instruction on how to delete Windows log files:
Step 1. In the search box, type cmd, and then run Command Prompt as administrator privileges.
Step 2. To delete individual log files, follow the commands:
wevtutil el (this will list all the logs)
wevtutil cl + the name of the log you want to delete
To delete all the log files on your Windows computer, type the following commands and press “Enter:
cd/
cd windows
del *.log /a /s /q /f
Windows PowerShell is another Windows command-line utility that can help you delete Windows log files. Here’s the stepwise:
Step 1. Type PowerShell in the search box and choose run as administrator to open Windows Powershell.
Step 2. Then, run this command:
Get-EventLog -LogName * | ForEach { Clear-EventLog $_.Log }
The fourth way is to use a third-party cleaning program. There is numerous software on the market, and one of the most popular is AOMEI Partition Assistant Standard. It's free yet powerful in cleaning all kinds of junk files to free up disk space. With a GUI interface, you can easily remove log files as well as other useless files(including temp files, registry files, cache files, etc) at the same time.
Just download the freeware and try how to delete Windows log files with this practical PC cleaner:
Step 1. Install and launch AOMEI Partition Assistant Standard, and then click "Free up" > "PC Cleaner".
Step 2. In the pop-up window, click "Start Scan" to scan for junk files.
Step 3. Wait until the scanning process completes.
Step 4. After the scan is completed, all kinds of available junk files will be listed. Tick log files or other junk files you want to delete, and then click "Clean All" to begin the cleaning process.
Step 5. When the clean is completed, you can click "Back" to exit the Window.
In addition to deleting Windows log files to obtain free space, AOMEI software also provides you with many other wonderful features to free up space and optimize performance after upgrading to the Pro edition:
Delete large files: Large files are eating up much disk space on hard drive. Deleting them will release some available space from your drives. Move folders from C drive to D drive: When your C drive is full while the D drive is empty, you can move out some folders or files on C drive to ease the burden of the system partition. Migrate OS to SSD: Due to the merits of SSD, transferring OS to it is a wise choice to speed up Windows 10.
Actually, it's hard for you to delete log files from C drive. You are only allowed to use a dedicated program to view the data. So, the best way to realize the removal of log files is to apply any one of the four methods we displayed above.
Windows upgrade log files are only needed when you have issues with Windows after an upgrade/update, so, if your computer behaves well after an upgrade/update, you can certainly delete these Windows upgrade log files.
How to delete Windows log files in Windows 11/10/8/7? There are four methods you can choose from: Event Viewer, Command Prompt, Windows PowerShell, and third-party PC cleaner. Hope at least one of them works for you. Note that deleting log files is only one of the ways to tidy up your computer. Thus, be bold to try other tips on freeing up space as we mentioned in this post.