Clearing all event logs in Windows 10’s Event Viewer frees up disk space and removes old records that can slow down the viewer or cause confusion when troubleshooting. This guide shows you the quickest way to clear every log at once, without needing third-party tools. You’ll need administrative rights on the PC.
What You’ll Need
- An account with administrator privileges (standard users cannot clear logs).
- Windows 10 (any recent version, 1809 or later works the same).
- Optional: a backup of the logs if you might need them later (see Tips).
Step-by-Step
- Open Event Viewer as Administrator. Press Windows + X and select Event Viewer from the menu. If prompted by User Account Control, click Yes.
- Expand the log tree. In the left pane, expand Windows Logs. You’ll see the five standard logs: Application, Security, Setup, System, and Forwarded Events.
- Clear each log individually. Right-click on a log (e.g., Application) and choose Clear Log… from the context menu.
- Choose to save or discard. A dialog asks if you want to save the log before clearing. Click Save and Clear to keep a copy, or Clear to delete without saving. Repeat for each of the five logs.
- Clear logs from other categories (optional). Expand Applications and Services Logs and clear any logs you care about (e.g., Microsoft > Windows > PowerShell). These are numerous, so only clear the ones you need.
- Alternative: Use a command line (faster for all logs). Open Command Prompt as Administrator (right-click Start > Windows PowerShell (Admin)). Then run the following command to clear all standard logs at once:
wevtutil el | Foreach-Object { wevtutil cl "$_" }
This enumerates every log and clears each one. It works in both PowerShell and Command Prompt (if you use PowerShell, the syntax is the same).
Common Mistakes
- Not running as administrator – you’ll get an “Access Denied” error or the Clear Log option will be grayed out.
- Clearing only Windows Logs – many applications write to their own logs under Applications and Services, so those remain.
- Forgetting to save logs you might need – once cleared, the data is gone unless you saved it.
- Using the wrong command syntax – in Command Prompt, the
Foreach-Objectpart is PowerShell-specific. If you’re in cmd.exe, use a different approach (see Tips).
Tips
- Backup before clearing – right-click a log, select Save All Events As… to create an .evtx file. You can reopen it later in Event Viewer.
- Use the command line for speed – the one-liner above clears every log in seconds. For cmd.exe, use:
for /F "tokens=*" %a in ('wevtutil el') do wevtutil cl "%a"(note the double percent signs in a batch file). - Clear only logs that are large – right-click a log, go to Properties, and you’ll see the current size. If a log is huge, that’s the one to clear.
- Automate it – create a scheduled task to run the command weekly if logs accumulate quickly.
Troubleshooting
“Access Denied” when clearing a log – Make sure you’re running Event Viewer or the command prompt as administrator. If you are, but still get this error, the log may be protected (like the Security log). Try disabling antivirus temporarily or booting into Safe Mode.
Log won’t clear because it’s in use – Some logs are actively written to by the system. You can still clear them, but they’ll immediately start filling again. If the clear operation fails, stop the related service (e.g., Windows Event Log service) – but be careful: stopping that service will disable logging temporarily.
Event Viewer freezes or crashes – This often happens when a log file is corrupted. Instead of clearing, try renaming the .evtx file in C:\Windows\System32\winevt\Logs (you’ll need to stop the Event Log service first). Then restart the service – it will create a fresh log.
Command line returns errors for some logs – Some logs are empty or have permissions that prevent clearing. The errors are usually harmless; check the log name in the error to see if it’s one you care about.
Frequently Asked Questions
Q: Does clearing event logs speed up my computer?
A: Not significantly. Event logs are small files; clearing them frees up a few megabytes at most. However, a huge log can slow down Event Viewer itself, so clearing helps if you use it often.
Q: Can I clear the Security log?
A: Yes, but you need administrator rights. The Security log is often protected, but an admin can clear it. On domain-joined machines, group policy may prevent this.
Q: Will clearing logs affect system performance or stability?
A: No. Clearing logs only removes historical records; it does not affect running processes. The system will continue to write new events normally.
Q: How do I clear only logs older than a certain date?
A: The built-in tools don’t support date-based clearing. You’d need to export logs, then clear them, or use PowerShell to filter and delete specific events (which is complex).
Q: Can I recover cleared event logs?
A: If you didn’t save them, no. Once cleared, the data is gone. Some third-party recovery tools might find remnants, but it’s not reliable.
Q: Is there a way to clear all logs in one click without commands?
A: Not in the GUI. You must right-click each log individually. The command-line method is the only way to clear all at once.
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
- How to Find Leaked Passwords in Chrome, Edge, Wallet & iCloud Keychain
- Fingerprint Limit Reached on MacBook Pro: Fix It
- WhatsApp Call Errors: Meanings & Fixes
- Error 0x8007025d: Fix Windows Install Fails
- Net Framework 3.5 Installation Error 0x800f0950
- How to Organize Google Photos with Face Groups & Labels