Clear All Windows Event Logs with wevtutil

How to wipe Windows event logs (Application, System, Security and more) from the command line using wevtutil.

Windowscmdprivacyevent-logMedium risk
Run `wevtutil el | ForEach-Object { wevtutil cl "$_" }` in an elevated PowerShell window to clear every event log at once.

01Command

Command
$ wevtutil el | ForEach-Object { wevtutil cl "$_" }

02What it does

Windows records thousands of events into dozens of logs, which is useful for troubleshooting but can clutter reports or reveal history before handing a PC to someone else. The wevtutil command has two subcommands that matter here: `el` lists every log name, and `cl <LogName>` clears one log. Looping the list through `cl` empties all logs in one shot, instead of clicking through Event Viewer log by log.

03Risk

RiskMedium risk
Requirements需要以管理员身份运行终端;清空后的旧日志无法恢复。
!Warning: Clearing event logs erases diagnostic history permanently — if a bug or crash needs investigating later, that evidence is gone. Security and audit logs may also be required for compliance in work environments.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

Last verified: 2026-09-18 · Category: System & Settings

06Related solutions