Share via


Clear individual Log in Event Viewer

Question

Tuesday, August 27, 2019 4:12 PM

Hello,

How can I clear an individual Log in Event Viewer? I select an event and click to Clear. But clear all logs.

Thanks

All replies (6)

Tuesday, August 27, 2019 6:10 PM

Hello Arash,

Doing what you described would clear an individual log in Event Viewer like in option 4 of the tutorial below.

https://www.tenforums.com/tutorials/16588-clear-all-event-logs-event-viewer-windows.html

If you mean how to delete a specific event in a log instead, I'm not sure you are able to other than clearing all events in a log.


Tuesday, August 27, 2019 8:51 PM

Thnak you for tour answer,

I want delete a specific event. Can I?


Tuesday, August 27, 2019 8:55 PM

You can filter the log to help only see events you want, but I'm not aware of a way to delete individual events.


Tuesday, August 27, 2019 9:11 PM

Why we can not delete specific log? for security reasons?


Tuesday, August 27, 2019 9:28 PM

Hello Arash_89,

There is no routine to delete individual events in the Event Logging API (https://docs.microsoft.com/en-gb/windows/win32/eventlog/event-logging-functions).

One can only speculate as to why. Perhaps because the event log is a sequential file and "deleting" an event might involve moving all of the following data. One could imagine just providing an "overwrite erase" routine, but why would one bother to do this? As you hint yourself, the lack of such a function also has some security benefits, making it difficult to cover ones tracks after doing something one shouldn't have done...

Gary


Thursday, August 29, 2019 3:12 AM

Hi,

Unfortunately we could only clear the whole log. You can refer to the explanation by mrTomahawk in the following link:

How can I remove specific events from the event log in Windows Server 2008?

https://serverfault.com/questions/8339/how-can-i-remove-specific-events-from-the-event-log-in-windows-server-2008

Please Note: Since the website is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

Hope it could be helpful.

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].