How To Delete Win Log Files In Windows 10 Latest 2021
In order to work smoothly Windows generate many temporary files, so that files can load much faster than usual it not only improve the performance but also creates some issues which are responsible for multiple errors. Windows 10 keeps a log of errors in the event log, from which the user can access the error code and also perform the appropriate steps to resolve the issue. This event log is helpful in a way but it can also create trouble for you because it can end up saving a lot of information which can be the reason for storage space running out in your PC. READ MORE: Ralink Linux Client: Why Ralink Showing Up In Windows Network
1 Delete Windows log Files in Windows 101.1 Method 1: Cleaning log files using PC cleanup Tools1.2 Clearing a log file using CCleaner1.3 Clearing Log files using SDelete1.4 Method 2: Cleaning log files using Command prompt1.5 Steps for removing log files using command prompt1.6 Method 3: Deleting log files with Event Viewer1.6.1 Final Words
You can navigate into these files in a config subdirectory of windows or winevt C:\Windows\System32\config or C:\Windows\System32\winevt These files are quite small in size, but they start piling up for long and start acquiring a large space in your system. And that’s when you think of deleting these waste files. And obviously, the extension used by these files is “.log“, as said earlier these files are required for recording significant errors that are likely to be encountered by any windows program or other applications. Since these programs mainly record recent activities of the system, they are sizeable. They often require another program that is dedicated primarily to viewing the data which is registered within them. However, most users leave them as it is because it is only required for detailed troubleshooting, but some tech guys like to clear these event logs persistently. This is done mainly to save data in the hard drive and ensure that the hard drive can store new log files at a faster rate. Well, deleting these log files isn’t a hectic task, and so in this article, we will go through a few methods by which we can do our task. READ MORE: How To Fix Can’t Take Screenshot Due To Security Policy Error
Method 1: Cleaning log files using PC cleanup Tools#
Well, there are other methods to be used, but these are some of the methods which can help you clean without getting trouble in coding and going in through the command line.
Clearing a log file using CCleaner#
In case you use a drive-maintenance program CCleaner, its easy for you to delete these log files without using any program which is mainly dedicated to this purpose. So you first need to open CCleaner and then open the “Cleaner” menu, now you need to open “windows” tab and start scrolling down. There you will find an option written “Windows Log Files”, check the box in there. Now click on the “Run Cleaner” button. It will start collecting your log files on your system for you. As soon as all the log files are generated and appear on your screen, click that button again. This will clean all the log files on your system with the selected files.
Clearing Log files using SDelete#
This program is free to use, and you can download it easily from Microsoft. After you download its zip file, you need to extract two of its executable files which you will find in the zip file of this folder. However, locating files with .exe extension in the System32 folder gives access to the required application. Well, it doesn’t matter where these files are actually found. For SDelete, the required command-line structure is given below: Sdelete –p –s –q
Method 2: Cleaning log files using Command prompt#
So, this one is for tech junkies, who generally give most of their time on command prompt. It is one of the most effective ways of deleting log files and having track of them.
Steps for removing log files using command prompt#
This will delete all your existing log files of your computer and clean up your space. There is one more way to delete these files using the command prompt by making a .cmd extension file. But we will talk about that in later articles.
Method 3: Deleting log files with Event Viewer#
Deleting log files using the event viewer is a good way to see all the steps required to clean up and watch all the steps that are going on.
READ MORE: Enable and Disable Service Host Superfetch in Windows 7/8/10
Final Words#
So, finally, we come to know that log files are system-generated files that contain recent information on any program running on your computer. You can also say that these are some temporary, cache or junk files which are created by windows for troubleshooting purpose. Also, some log files are created during the software installation and windows up-gradation which are of no use and should be cleaned up regularly to maintain space on your computer.
How to Delete Win Log Files in Windows 10? Here’re 4 Ways!
Do you want to delete Win log files in Windows 10 to free up some disk space? How to delete these Windows log files? In this post, MiniTool will introduce some simple ways to you in detail. Just follow one to easily delete the log files.
What Are Win Log Files in Windows 10
When there is a program error or a noteworthy operation on your computer, Windows will store a record of it to troubleshoot. These records are saved to the dedicated log files in the Windows directory. Windows log files are also known as Win log files.
Usually, you can find the log files by going to the path (depending on Windows versions) – C:\Windows\System32\winevt or C:\Windows\System32\config.
However, these log files may be large and take up much disk space of the hard drive. To free up disk space, you may choose to delete them. But how to delete Win log files in Windows 10?
In the following part, we will introduce some methods for you.
How to Delete Win Log Files in Windows 10
Delete Windows Log Files Using the Event Viewer
To delete log files, the Event Viewer is helpful, and here are the steps you should follow:
![]()
This tutorial offers 7 ways to open Event Viewer Windows 10, and introduces how to use Event Viewer on Windows 10.
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 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.
Alternatively, you can right-click a folder like Application and choose Clear Log to delete all the entries.

Use Command Prompt to Delete Log Files Windows 10
Command Prompt is the command-line utility in Windows and it can be used to perform many tasks including deleting Win log files.
![]()
This article will show you 10 useful command prompt tricks for Windows users. If you want to learn some Command Prompt Windows 10 tricks, check out this post.
Just follow these instructions for this task:
Step 1: Run Command Prompt with administrative privileges.
Step 2: Type the following commands and press Enter after each command:
cd/
cd windows
del *.log /a /s /q /f

This will delete all the log files from your computer. If you want to delete individual log files, try these steps.
Step 1: Also run Command Prompt as administrator.
Step 2: Type wevtutil el and press Enter to list all the logs.
Step 3: TYpe wevtutil cl + the name of the log you want to delete and press Enter to remove the log file.
Use a .CMD File to Delete Win Log Files
How to delete Win log files in Windows via a .cmd file? Follow these steps:
Step 1: Run your notepad in Windows 10
Step 2: Copy and paste the following codes to your text:
@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 to a .cmd file and run it as administrator.
Use a Third-Party App to Delete Log Files Windows 10
On the market, many third-party programs can be used to delete temporary files, log files, and other junk files. One of the most popular apps is CCleaner and you can get it from the Internet to have a try.
Bottom Line
How to delete Win log files in Windows 10? If you need to delete log files, these four methods are simple and just choose one to start the deletion task.
About The Author
Vera is an editor of the MiniTool Team since 2016 who has more than 7 years’ writing experiences in the field of technical articles. Her articles mainly focus on disk & partition management, PC data recovery, video conversion, as well as PC backup & restore, helping users to solve some errors and issues when using their computers. In her spare times, she likes shopping, playing games and reading some articles.
Как удалить временные файлы в Windows 7. Log, tmp, bak — поиск и удаление.
Windows и многие приложения создают временные файлы. Временный файл содержит данные, которые приложение не желает хранить в оперативной памяти из-за ее неустойчивости. В то же время, в отличие от документов, которые Вы создаете с помощью приложения, эти данные не предназначены для долговременного хранения. Таким образом, временные данные представляют собой нечто среднее — они необходимы, но лишь на короткое время. Проблема заключается в том, что некоторые временные файлы существуют дольше, чем изначально предполагается. Зачастую в этом виновато создавшее их приложение.
Перед началом поиска временных файлов с целью их удаления закройте все приложения, которые можете. Может оказаться, что работающие приложения используют временные файлы для краткосрочного хранения данных или других нужд. Удаление временного файла в этом случае может привести к потере данных и прочим нежелательным последствиям.
Использование командной строки вместо проводника
Хотя проводник и не обнаруживает все временные файлы (лишь их большую часть), он располагает замечательным интерфейсом, а возможность увидеть файлы перед удалением делает очистку значительно безопаснее, чем при использовании утилит командной строки. Все, что Вам требуется сделать после обнаружения временных файлов для их безвозвратного удаления из системы, — выделить и нажать клавиши Shift+Del.
Существует две утилиты командной строки, составляющие альтернативу проводнику — Del и Erase. Однако при их выполнении я рекомендую соблюдать осторожность. Убедитесь в наличии полной резервной копии системы и закройте как можно больше открытых приложений (по возможности оставьте только окно командной строки). Действуют утилиты Del и Erase одинаково, поэтому в качестве примера рассмотрим только утилиту Del. Чтобы удалить файл, введите в командной строке следующую команду:
Del имя_файла
Этот способ не предполагает возможности восстановления, поэтому Вы не обнаружите удаленные файлы в корзине. Ниже перечислены ключи утилиты Del.
- /А — удаляет файлы с заданным атрибутом. Атрибут указывается путем добавления идентифицирующей его буквы: А (архивный), Н (скрытый), R (только чтение) и S (системный). Атрибут может содержать знак — (минус), указывающий на то, что файлы с данным атрибутом, напротив, не следует удалять. Например, чтобы удалить файлы для чтения без системного атрибута, следует указать два ключа — /AR и /А-S.
- /F — удаляет файлы только для чтения. По умолчанию утилита Del игнорирует их, поскольку удаление таких файлов требует изменения их статуса. Никогда не используйте этот ключ при удалении временных файлов. При обнаружении временного файла с атрибутом «только чтение» выясните причину его установки. Возможно, это обусловлено проблемами в приложении, которое создало временный файл.
- /Р — предписывает утилите Del выводить запрос на подтверждение при удалении файла. Используйте этот ключ, если сомневаетесь в необходимости удаления всех файлов по заданному критерию. Хотя подобный метод займет у Вас некоторое время, это лучше, чем совершить ошибку, удалив полезные файлы.
- /Q — этот ключ самый опасный, поскольку отключает вывод на экран удаляемых файлов. Если Вы не желаете видеть файлы-, то более удачным решением является перенаправить вывод с экрана в файл. Например, чтобы удалить все файлы, начинающиеся с символа
Del /S > Удаленные_файлы.ТХТ

Список файлов не появится на экране, однако будет сохранен для последующего анализа.
- /S — удаляет все файлы, удовлетворяющие заданному критерию, в текущей папке и всех вложенных в нее папках. При использовании в корневой папке этот ключ позволяет удалить файлы определенного вида на всем замененном жестком диске. Следует пользоваться данной функцией с осторожностью — во вложенных папках могут оказаться файлы, соответствующие критерию удаления, которые, на самом деле, нужно сохранить.
Достоинства утилиты Del — ее высокое быстродействие и полнота. В отличие от проводника она не пропускает файлы и работает гораздо быстрее. С ее помощью можно очистить жесткий диск за считанные секунды, в то время как использование проводника занимает минуты.

Удаление файлов, начинающихся с тильды
Пожалуй, «самыми» временными файлами можно назвать те, чьи имена начинаются с символа
(тильда). Windows и многие приложения, используют файлы, начинающиеся с символа
(тильда) и не имеющие расширения, в основном, для хранения битов и фрагментов информации. При этом ни Word, ни другие приложения не прикладывают должных усилий к удалению этих файлов.
При наличии расширения (как, например, файлы, создаваемые Microsoft Word) временный файл представляет собой промежуточную форму документа, над которым Вы работаете. Тем не менее, если окно Word не открыто, а Вы видите подобные файлы на жестком диске, то это обычно указывает на некорректное завершение Word. В этом случае временные файлы могут быть использованы для восстановления потерянных данных документа. К сожалению, после восстановления временные файлы не удаляются, поэтому, возможно, имеет смысл удалить их вручную. Общая идея такова: файл с расширением, как правило, является временной версией документа, и ее не следует удалять, не приняв взвешенного решения.
Вне зависимости от того, сколько приложений Вы закроете при очистке жесткого диска, несколько файлов, начинающихся с символа
(тильда), все равно останутся открытыми. Как проводник, так и утилита Del выведут сообщения о том, что эти файлы используются, и откажутся удалять их при любых условиях. Просто оставьте эти файлы в покое.
Не удивляйтесь тому, что размер некоторых временных файлов равен 0 байт (другими словами, в них отсутствует информация). Часть этих файлов действительно пуста, а часть скрывает свою информацию при помощи так называемых потоков данных. Тем не менее, их следует удалить, чтобы освободить элементы каталога для других приложений. Иногда записей каталога не остается, что приводит к нестабильности системы.
Уничтожение ТМР и ВАК-файлов
Обычно удалить ТМР-файлы с жесткого диска можно, закрыв все приложения. Возможно, Windows оставит 1-2 файла открытыми, однако в ТМР-файле никогда не содержатся данные, которые пригодятся Вам в будущем. Удаление ТМР-файлов — дело вполне безопасное и безусловно полезное.

Аналогично ВАК файлы (резервные файлы) содержат старые копии документов, с которыми Вы работаете. После закрытия приложения ВАК-файл перестает использоваться, и Вы можете смело удалить его. Я, как правило, сохраняю ВАК-файлы до создания резервной копии жесткого диска, и удаляю их в процессе последующей очистки. ВАК-файл представляет собой временную резервную копию данных; Вы можете использовать его для восстановления данных, потерянных в результате сбоя приложения.
Не все приложения присваивают файлам расширение ВАК, например, Microsoft Word вместо ВАК использует расширение WBK. Назначение этих файлов то же самое, просто компания-разработчик делает все возможное, чтобы запутать пользователей. Расширения временных файлов должны быть указаны в руководстве пользователя приложения, однако иногда, чтобы определить их, необходимо создать файл и несколько раз сохранить его, а между сеансами сохранения обязательно модифицировать. Временный файл располагается в той же папке, что и исходный, имеет такое же имя, но использует расширение, выделенное приложением для резервных файлов.
Поиск LOG-файлов
LOG-файлы, как правило, представляют собой текстовые документы, описывающие результаты какой-либо процедуры, например, процедуры установки приложения. В случае ошибки LOG-файл сообщает о ней и иногда предлагает возможные варианты ее исправления. Windows создает LOG-файлы при обновлении, указывая в них имена обновленных файлов и описывая свои действия. Говоря кратко, LOG-файлы — это полезные протоколы системной деятельности.
К сожалению, ни Windows, ни приложения никогда не удаляют LOG-файлы, и в этом не следует обвинять компанию-поставщика или программиста, создавшего приложение. Предполагается, что Вы ознакомитесь с содержимым LOG- файла и, следуя соглашению с компанией, удалите или заархивируете его. Иногда само приложение уведомляет Вас о LOG-файле и действиях, которые следует предпринять. В большинстве же случаев приложение даже не сообщает о генерации LOG-файла. Узнать о моменте его создания и определить его местоположение — полностью ваша задача.
Любопытный факт заключается в том, что иногда Вы можете натолкнуться на приложения, использующие LOG-файлы постоянно. В этих случаях удалять LOG- файлы, разумеется, не следует. Например, UPS-приложения, которые я использую, пользуются LOG-файлом для вывода сообщений о событиях, связанных с питанием, например, скачках напряжения. В LOG-файле также содержится информация о времени последнего запуска процедуры диагностики и других выполненных действиях. Тем не менее, если я удалю этот файл, с UPS-приложением не произойдет ничего страшного — оно просто «забудет» прошлые события.
LOG-файлы, которые Вы можете безболезненно удалить, находятся в папках приложений и в папке \Windows. Как правило, не следует удалять LOG-файлы из таких папок, как \Windows\System32 и др. Вы можете начать с удаления LOG-файлов из папки \Windows, предварительно прочитав или заархивировав их. После этого займитесь поиском остальных LOG-файлов системы. LOG-файлы, расположенные в папках приложений, следует прочитать, чтобы определить, используются ли они приложением. Если окажется, что нет, можете смело удалять их.
How To Delete Win Log Files In Windows 10?
Windows is notorious for filling up the storage. Many temporary files are generated regularly, in order to decrease the loading time and improve performance in general. However, there are times when things go wrong and a multitude of errors show up in Windows.
Windows 10 keeps a log of the errors in the Event log, which can be accessed by the users to extract the error code and perform the appropriate troubleshooting steps. This event log can end up saving a lot of information, which can result in your PC running out of space.
Here I shall discuss what is the default event viewer path, and How to delete win log files in Windows 10 including PowerShell clear all event logs.
Where Are Windows Log Files Stored In Windows 10?
Table of Contents
Before cleaning up Windows log files, you may be wondering what the event viewer default path is, and where are the Windows 10 event logs stored on our computers. This is an important piece of information that may come useful while troubleshooting your computer or clearing Windows log files.
There are two folders, depending on your Windows version where you may find the Windows log files. First, look in the following folder:
%windir%\System32\Winevt\Logs\
However, you may not find this folder on certain, in which case you can look under the following folder:
%windir%\System32\config\
Note: %windir% is your computer’s OS directory.
How To Delete Win Log Files In Windows 10?
While Windows 10 tries to free up space automatically, the Event Viewer fails most of the time in clearing the data automatically. In such cases, you will need to clear event log in Windows 10 manually. There are several ways to delete log files in Windows 10.
Method 1: Use Command Prompt
The command prompt is the Windows command-line utility tool, which can be used to perform any task in Windows with command lines. You can also use the command prompt to clear event viewer in Windows 10. You can use the command prompt to clear individual log files, or clear entire event log in Windows 10.
Here are the steps that you can follow to delete all Windows log files:
- Open an elevated command prompt. You can do so from the Windows search context menu, or from a Run dialog (use Ctrl + Shift + Enter to launch cmd with admin privileges).
- Next, go the event viewer default path that is mentioned above using the change directory command:
cd %windir%\system32\config - To clear all the win log files, type the following command and press Enter:
del *.log /a /s /q /f

All files with a .log extension will be deleted from your computer.
If you wish to clear individual log files, here are the commands that you need to enter:
- Open another admin command prompt.
- To list the log files, type the following command and press Enter:
wevtutil el

- From the list that appears, if you find a certain log file that you wish to delete, type the following command and press Enter:
wevtutil cl <name of the log>

This will delete that particular log from the Event Viewer file.
Method 2: Make A Command File To Automatically Clear Log Files
When you are trying new experimental features, there is a chance that you may be generating a lot of win log files on your computer if the feature crashes. In such cases, you might be wondering how to delete win log files in Windows 10 automatically.
You can make a command file (.cmd) to automate this process. Follow these steps to create this command file:
- Open a text editor like Notepad or MS visual code.
- Type the following code, or copy and paste the following 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
- Save the name of this command with the extension .cmd in any location that you prefer.

- Next, run this command file as administrator, by choosing the correct option from the right-click context menu.
You will see a command prompt window opens, and all the log files are cleared automatically.
Note: Run this file as admin to clear event log files.
Method 3: Use The Event Viewer GUI
In Windows 10, the Event Viewer GUI is polished and very easy to navigate through the settings. If you do not wish to work with command-line tools, you can use the GUI to delete win log files in Windows 10. Follow these steps to launch the event viewer, and clear event log in Windows 10:
- Open a Run dialog.
- Type eventvwr.msc and press Ctrl + Shift + Enter to launch the Event Viewer with admin rights.
- From the leftmost pane, expand the folders by clicking on the small arrow next to the folder.
- In the list of entries, select the entry from the middle pane and click on Clear Log… from Action section in the rightmost pane.
Pro Tip: You can use the Shift key to select a range of entries in the middle pane. - Repeat this for all the entries that you wish to delete.

While this may seem a long process, this is much simpler to navigate through, and you will be done deleting log files in Windows 10.
Method 4: Use PowerShell Clear All Event Logs
PowerShell is a much more powerful command-line tool, and you can use a single command to delete log files in Windows 10. Simply follow these steps:
- Open PowerShell as an admin. You can do this from the start menu, or from the WinX menu if you haven’t replaced PowerShell with CMD in Windows 10.
- Type the following command and press Enter:
wevtutil el | Foreach-Object

This will clear all the event logs in Windows 10.
Note: This command needs to be run with admin PowerShell.
Method 5: Use Third Party Applications
There are many third party cleaner applications, which can be used to clear temporary files and other junk files in Windows 10. You can use such third-party applications to clean up the event log files.
One of the most popular applications is CCleaner, which can be used to clean all junk files on your computer for free.
If you want a more powerful file deletion software, you can look for premium options like BitRaser For File and its alternatives.
Wrapping Up
So, there you have it. Now you know where the event log directory is and how to delete win log files in Windows 10 using the methods provided above. Comment below if you found this useful, and to discuss further the same.
About Prataan Chakraborty
A CU graduate, a tech enthusiast. He loves trying out new software and gadgets, and writes about them with a user friendly mindset.
Comments
All the tricks are working fine except the first one. Because I tried all the tricks with different systems and all the tricks are 100% working. Thank you.