Clearing the Windows Event Log removes all recorded system, application, and security events from your computer. This can free up disk space, remove potentially sensitive information, and give you a clean slate for troubleshooting. You’ll need administrative access to your Windows PC.
What You’ll Need
- An account with administrator privileges on the Windows computer.
- Access to the Start menu (or search bar).
- For the command-line method: a command prompt or PowerShell window.
Step-by-Step
There are several ways to clear the event logs. The most common are using the Event Viewer graphical tool, the command line, or PowerShell. Choose the method that works best for you.
Method 1: Using Event Viewer (GUI)
- Press Windows Key + R to open the Run dialog box.
- Type
eventvwr.mscand press Enter. This opens the Event Viewer. - In the left pane, expand Windows Logs. You’ll see subfolders like Application, Security, Setup, System, and Forwarded Events.
- Right-click on the log you want to clear (e.g., Application) and select Clear Log… from the context menu.
- A dialog box will appear asking if you want to save the log before clearing. Choose Save and Clear to keep a copy, or Clear to delete without saving.
- Repeat steps 4-5 for each log you want to clear (e.g., System, Security, Setup).
Method 2: Using Command Prompt (CMD)
- Open the Start menu, type
cmd, right-click on Command Prompt, and select Run as administrator. - To clear a specific log, type the following command and press Enter:
wevtutil cl <logname>
For example, to clear the Application log:
wevtutil cl Application
- Replace
<logname>with the actual log name. Common ones include:Application,System,Security,Setup, andForwardedEvents. - To clear all logs at once, you can run a loop. Type the following and press Enter:
for /F "tokens=*" %1 in ('wevtutil el') do wevtutil cl "%1"This will clear every event log on the system. Note: This may take a moment and could fail for logs that are currently in use.
Method 3: Using PowerShell
- Open the Start menu, type
powershell, right-click on Windows PowerShell, and select Run as administrator. - To clear a specific log, use the
Clear-EventLogcmdlet. For example:Clear-EventLog -LogName Application
- To clear multiple logs at once, list them separated by commas:
Clear-EventLog -LogName Application, System, Security
- To clear all logs, you can use:
Get-WinEvent -ListLog * | ForEach-Object { Clear-EventLog -LogName $_.LogName }This will clear every log that is available.
Common Mistakes
- Not running as administrator: If you don’t open the tool with admin rights, you’ll get an “Access denied” error. Always right-click and select “Run as administrator”.
- Clearing the wrong log: Double-check the log name before clearing. For example, “Application” is different from “System”. Clearing the wrong one may remove data you wanted to keep.
- Skipping the save option: If you clear without saving, the logs are gone forever. If you might need them later, save them to a file first.
- Using the CMD loop incorrectly: The
forloop in CMD requires the percent sign%when typed directly in the command prompt. If you put it in a batch file, you need double percent signs (%%).
Tips
- Clearing logs is a good idea before you start troubleshooting a new issue. A clean log makes it easier to spot new errors.
- If you’re clearing logs to free disk space, check the size of the log files first. In Event Viewer, right-click a log and select Properties to see its current size. You can also set a maximum log size and choose to overwrite old events automatically.
- To automate log clearing, you can create a scheduled task that runs the
wevtutil clcommand weekly or monthly. - Consider exporting logs to a file before clearing if you might need them for compliance or later analysis.
Troubleshooting
- “Access denied” error: This means you don’t have administrator privileges. Close the tool and reopen it using “Run as administrator”.
- “The specified channel could not be found” error: This means the log name you typed is incorrect. Use
wevtutil elto list all available log names, or check the spelling. - Log is in use: Some logs, like the Security log, may be locked by the system. Wait a few minutes and try again, or use the GUI method which may handle this better.
- Logs reappear immediately: Windows will create new events as soon as you clear them. This is normal. If you see a flood of events right after clearing, it’s likely because services are starting up.
- Event Viewer freezes: If Event Viewer becomes unresponsive while clearing, close it and restart. The log may still be cleared in the background.
Frequently Asked Questions
Will clearing event logs harm my computer?
No, clearing event logs does not affect system performance or stability. It only removes historical records of events.
Can I recover cleared event logs?
If you did not save them before clearing, they are gone. There is no built-in way to recover cleared logs.
How often should I clear event logs?
It depends on your needs. If you’re troubleshooting, clear before starting. Otherwise, you can let Windows manage them automatically by setting a maximum size.
Why can’t I clear the Security log?
You may need to disable the “Audit Log” policy temporarily, or the log may be locked by the system. Try using the command line with admin rights.
Does clearing logs improve performance?
It can free up disk space, but it won’t significantly speed up your system unless the logs were extremely large.
Can I clear logs from another computer remotely?
Yes, using wevtutil or PowerShell with the -ComputerName parameter, provided you have admin rights on the remote machine.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Other Storage on Android: What It Is & How to Clean It
- Facebook Messenger Games: How to Play With Friends
- Stop Chrome Auto-Opening on Windows Startup
- Snapchat Security: 12 Tips to Lock Down Your Account
- Missing Comma on iPhone Keyboard: Fix & Where It Went
- Get Pixel Weather & Screenshot Apps on Any Android