Home >System Tutorial >Windows Series >How to Clear All the Event Logs in Event Viewer
Event Viewer: Two Methods for Clearing Event Logs
Event Viewer is a valuable troubleshooting tool providing detailed system event information, including type, date, time, source, category, Event ID, logged-in user, and computer. This guide outlines two efficient ways to clear these logs, freeing up disk space.
Method 1: Clearing Individual Logs via Event Viewer
Event Viewer logs record significant computer events. Here's how to clear individual logs:
Step 1: Open Event Viewer. Press Win X, then press V.
Step 2: Select and Clear a Log. Expand "Windows Logs" in the left pane. Right-click the log (e.g., Application) you wish to clear and select "Clear Log." Alternatively, select the log and use the "Clear Log" option in the Actions pane.
Step 3: Save or Discard Logs. Choose whether to save the log contents. Click "Clear" to proceed. Saving logs is beneficial for advanced troubleshooting.
Step 4: Repeat steps 2 and 3 for other logs.
Step 5: Close Event Viewer.
Method 2: Clearing All Logs via Command Prompt
This method offers a quicker way to clear all event logs simultaneously:
Step 1: Open Command Prompt as Administrator. Press Win X and select "Command Prompt (Admin)".
Step 2: Allow UAC access. Click "Yes" if prompted by User Account Control.
Step 3: Execute the Command. Paste the following command into the elevated command prompt and press Enter:
for /F "tokens=*" %1 in ('wevtutil.exe el') DO wevtutil.exe cl "%1"
Step 4: Close Command Prompt. All event logs will be cleared.
The above is the detailed content of How to Clear All the Event Logs in Event Viewer. For more information, please follow other related articles on the PHP Chinese website!