{"id":967,"date":"2017-01-04T16:20:04","date_gmt":"2017-01-04T16:20:04","guid":{"rendered":"http:\/\/www.sorcim.com\/blog\/?p=967"},"modified":"2024-12-25T23:19:51","modified_gmt":"2024-12-25T23:19:51","slug":"delete-system-log-files-safely","status":"publish","type":"post","link":"https:\/\/www.sorcim.com\/blog\/delete-system-log-files-safely","title":{"rendered":"Delete System Log Files Safely"},"content":{"rendered":"<h2><strong>What is a System Log File?<\/strong><\/h2>\n<p>A <b>Log<\/b> File (<b>.log<\/b>) contains the details of events that occurred while executing a program.<\/p>\n<p><!--more--><\/p>\n<p>It is a way of collecting data that helps software developers and computer experts identify runtime issues, such as a computer crash, system reboot, blue screen of death, or an error message. Typically, most software architecture makes use of a logging system to generate, filter, encode and record application log messages.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong>What is An Event Viewer?<\/strong><\/h2>\n<p><b>Event Viewer<\/b> is a part of <b>Microsoft Management Console<\/b> (<b>MMC<\/b>). It is primarily used to view <b>system logs<\/b>, which are system files that contain information useful for system diagnostic and troubleshooting purposes. It displays information in an easy to comprehend manner using console trees. You can view the information and even save a copy of it. You can even sweep clean <b>system logs<\/b> to recover disk space if required.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong>Types of Events<\/strong><\/h2>\n<p>Log files are further classified into the following categories:<\/p>\n<ul>\n<li><b>Custom Views: <\/b>It is a filter that includes events from event logs according to the specified criteria.<\/li>\n<\/ul>\n<ul>\n<li><b>Windows Logs:<\/b> These <a href=\"https:\/\/www.stcleaner.com\/blog\/2016\/01\/27\/clean-up-windows-log-files\/\" target=\"_blank\" rel=\"noopener\">log files <\/a>contain details on just about any kind of the most frequently occurring events that take place including boot time logs, security logs, setup logs, system logs etc.<\/li>\n<\/ul>\n<ul>\n<li><b>Applications and Services Logs:<\/b> This includes logs stored by individual applications \u2013 both <b>Microsoft<\/b> and <b>Non-Microsoft<\/b>, as well as various services and processes that run in the background.<\/li>\n<\/ul>\n<ul>\n<li><b>Subscriptions:<\/b> This includes source-initiated event subscriptions and collector-initiated subscriptions that are collected from multiple event source computers by a single collector computer.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2><strong>Clearing the Event Log<\/strong><\/h2>\n<h3><strong>Using Event Viewer<\/strong><\/h3>\n<ol>\n<li>In the <b>Search<\/b> Box on the <b>Taskbar<\/b>, type <b>Event Viewer<\/b>.<\/li>\n<li>Open the <b>Event Viewer<\/b> from the <b>Search Results<\/b>.<\/li>\n<li>Expand the top-most nodes; navigate to the event log you want to clear using the console tree on the left.<\/li>\n<li>Click the <b>Action<\/b> menu.<\/li>\n<li>Select <b>Clear Log<\/b>.<\/li>\n<li>Click the <b>Clear<\/b> button in the subsequent dialog box.<\/li>\n<\/ol>\n<p><em><span style=\"text-decoration: underline;\"><b>Note:<\/b><\/span><\/em><\/p>\n<ul>\n<li>You may, alternatively, select a log item, and click the <b>Clear Log<\/b> option on the <b>Actions<\/b> panel on the right-hand side.<\/li>\n<li>If you want to save the event logs before cleaning, use the <b>Save and Clean<\/b> option in <b>step # 6<\/b> above.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3><strong>Deleting Console Files Saved in your Profile<\/strong><\/h3>\n<ol>\n<li>In the <b>Event Viewer<\/b> window, click the <b>File<\/b> menu in the menu bar.<\/li>\n<li>Select <b>Options<\/b>.<\/li>\n<li>Click the <b>Disk CleanUp<\/b> tab in the <b>Options<\/b> dialog.<\/li>\n<li>In this dialog, you can see the amount of disk space used by saved files in your profile.<\/li>\n<li>Click the <b>Delete<\/b><b>Files<\/b> button to delete the files.<\/li>\n<li>To exit, click <b>OK<\/b>.<\/li>\n<\/ol>\n<h3><strong>Using Command Prompt<\/strong><\/h3>\n<ol>\n<li>Press <b>Windows Key<\/b> + <b>X<\/b>.<\/li>\n<li>Select <b>Command Prompt<\/b> option.<\/li>\n<li>In the <b>CMD<\/b> window, type the following command and press <b>Enter<\/b>:<br \/>\n<b>for \/F &#8220;tokens=*&#8221; %1 in (&#8216;wevtutil.exe el&#8217;) DO wevtutil.exe cl &#8220;%1&#8221;<\/b><\/li>\n<li>After finishing up quit the window.<\/li>\n<\/ol>\n<h3><strong>Using Windows PowerShell<\/strong><\/h3>\n<ol>\n<li>Type <b>Windows PowerShell<\/b> in the <b>Search Box<\/b> on the <b>Taskbar<\/b>.<\/li>\n<li>Open the <b>Windows PowerShell<\/b> program from the <b>Search Results<\/b>.<\/li>\n<li>In the newly open screen, execute the following command:<br \/>\n<b>Get-EventLog -LogName * | ForEach { Clear-EventLog $_.Log }<\/b><\/li>\n<\/ol>\n<h3><strong>Using Windows Disk Clean-Up<\/strong><\/h3>\n<ol>\n<li>Double-click <b>This PC<\/b> icon on the <b>Desktop<\/b>.<\/li>\n<li>Right-click the drive which contains <b>Windows<\/b> and other installed applications.<\/li>\n<li>Select <b>Properties<\/b>.<\/li>\n<li>It opens up the <b>Drive Properties<\/b> dialog.<\/li>\n<li>Click the <b>Disk CleanUp<\/b> button in the <b>General<\/b> tab.<\/li>\n<li>Let <b>Disk CleanUp<\/b> calculate the total volume of temporary files that can be cleaned up.<\/li>\n<li>Thereafter, select all the items including the following one:<br \/>\n<b>System archived Windows error reporting<\/b><\/li>\n<li>Click the <b>OK<\/b> button.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>What is a System Log File? A Log File (.log) contains the details of events that occurred while executing a program.<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,55],"tags":[613,611,612,614],"class_list":["post-967","post","type-post","status-publish","format-standard","hentry","category-sorcim-articles","category-windows","tag-delete-system-log-files","tag-deleting-windows-logs","tag-safely-remove-system-logs","tag-system-log-files-safe-removal"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.sorcim.com\/blog\/wp-json\/wp\/v2\/posts\/967","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sorcim.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sorcim.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sorcim.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sorcim.com\/blog\/wp-json\/wp\/v2\/comments?post=967"}],"version-history":[{"count":6,"href":"https:\/\/www.sorcim.com\/blog\/wp-json\/wp\/v2\/posts\/967\/revisions"}],"predecessor-version":[{"id":2743,"href":"https:\/\/www.sorcim.com\/blog\/wp-json\/wp\/v2\/posts\/967\/revisions\/2743"}],"wp:attachment":[{"href":"https:\/\/www.sorcim.com\/blog\/wp-json\/wp\/v2\/media?parent=967"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sorcim.com\/blog\/wp-json\/wp\/v2\/categories?post=967"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sorcim.com\/blog\/wp-json\/wp\/v2\/tags?post=967"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}