Delete System Log Files Safely January 4, 2017October 22, 2018 Raza Ali Kazmi Sorcim Articles, Windows What is a System Log File? A Log File (.log) contains the details of events that occurred while executing a program. It is a way of collecting data that helps software developers and computer experts identify runtime issues, such as a computer crash, system reboot, blue screen of death, or an error message. Typically, most software architecture makes use of a logging system to generate, filter, encode and record application log messages. What is An Event Viewer? Event Viewer is a part of Microsoft Management Console (MMC). It is primarily used to view system logs, which are system files that contain information useful for system diagnostic and troubleshooting purposes. It displays information in an easy to comprehend manner using console trees. You can view the information and even save a copy of it. You can even sweep clean system logs to recover disk space if required. Types of Events Log files are further classified into the following categories: Custom Views: It is a filter that includes events from event logs according to the specified criteria. Windows Logs: These log files contain details on just about any kind of the most frequently occurring events that take place including boot time logs, security logs, setup logs, system logs etc. Applications and Services Logs: This includes logs stored by individual applications – both Microsoft and Non-Microsoft, as well as various services and processes that run in the background. Subscriptions: This includes source-initiated event subscriptions and collector-initiated subscriptions that are collected from multiple event source computers by a single collector computer. Clearing the Event Log Using Event Viewer In the Search Box on the Taskbar, type Event Viewer. Open the Event Viewer from the Search Results. Expand the top-most nodes; navigate to the event log you want to clear using the console tree on the left. Click the Action menu. Select Clear Log. Click the Clear button in the subsequent dialog box. Note: You may, alternatively, select a log item, and click the Clear Log option on the Actions panel on the right-hand side. If you want to save the event logs before cleaning, use the Save and Clean option in step # 6 above. Deleting Console Files Saved in your Profile In the Event Viewer window, click the File menu in the menu bar. Select Options. Click the Disk CleanUp tab in the Options dialog. In this dialog, you can see the amount of disk space used by saved files in your profile. Click the DeleteFiles button to delete the files. To exit, click OK. Using Command Prompt Press Windows Key + X. Select Command Prompt option. In the CMD window, type the following command and press Enter: for /F “tokens=*” %1 in (‘wevtutil.exe el’) DO wevtutil.exe cl “%1” After finishing up quit the window. Using Windows PowerShell Type Windows PowerShell in the Search Box on the Taskbar. Open the Windows PowerShell program from the Search Results. In the newly open screen, execute the following command: Get-EventLog -LogName * | ForEach { Clear-EventLog $_.Log } Using Windows Disk Clean-Up Double-click This PC icon on the Desktop. Right-click the drive which contains Windows and other installed applications. Select Properties. It opens up the Drive Properties dialog. Click the Disk CleanUp button in the General tab. Let Disk CleanUp calculate the total volume of temporary files that can be cleaned up. Thereafter, select all the items including the following one: System archived Windows error reporting Click the OK button.