# How To Scrubbing PC Logs Via CMD | Command Prompt

**URL:** <https://onehack.st/t/how-to-scrubbing-pc-logs-via-cmd-command-prompt/229040>\
**Category:** Tutorials & Methods\
**Tags:** tools, tips-tricks, file-management\
**Created:** [November 28, 2022, 9:42pm UTC](https://onehack.st/t/how-to-scrubbing-pc-logs-via-cmd-command-prompt/229040 "2022-11-28T21:42:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Parizaad](https://onehack.st/user_avatar/onehack.st/parizaad/32/174871_2.png) [@Parizaad](https://onehack.st/u/Parizaad)\
**Post date:** [November 28, 2022, 9:42pm UTC](https://onehack.st/t/how-to-scrubbing-pc-logs-via-cmd-command-prompt/229040/1 "2022-11-28T21:42:51Z")

</div>

I’m going write how to Scrubbing PC logs via CMD (Command Prompt)

Simple commands using CMD to remove your system logs that everyone might not know.

Delete previous DNS server

> ipconfig /flushdns

Purges the contents of the NetBIOS name cache

> nbtstat -R

Clear File explorer history and dialog box history

> Del /F /Q %APPDATA%\Microsoft\Windows\Recent\*  
> Del /F /Q %APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations\*  
> Del /F /Q %APPDATA%\Microsoft\Windows\Recent\CustomDestinations\*  
> REG Delete HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\RunMRU /VA /F  
> REG Delete HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\TypedPaths /VA /F

CBS.log file records entries when a static file changes.

> del “C:\Windows\Logs\CBS\CbsPersist\*.cab” /s /f /q  
> del “C:\Windows\Logs\CBS\CbsPersist\*.log” /s /f /q  
> del “C:\Windows\Logs\CBS\Cbs\*.log” /s /f /q

Clear Windows Events logs

> for /F “tokens=\*” %1 in (‘wevtutil.exe el’) DO wevtutil.exe cl “%1”  
> pause\>null

**Enjoy!**
