clear cache of browser by command line clear cache of browser by command line google-chrome google-chrome

clear cache of browser by command line


Here is how to clear all trash & caches (without other private data in browsers) by a command line. This is a command line batch script that takes care of all trash (as of April 2014):

erase "%TEMP%\*.*" /f /s /qfor /D %%i in ("%TEMP%\*") do RD /S /Q "%%i"erase "%TMP%\*.*" /f /s /qfor /D %%i in ("%TMP%\*") do RD /S /Q "%%i"erase "%ALLUSERSPROFILE%\TEMP\*.*" /f /s /qfor /D %%i in ("%ALLUSERSPROFILE%\TEMP\*") do RD /S /Q "%%i"erase "%SystemRoot%\TEMP\*.*" /f /s /qfor /D %%i in ("%SystemRoot%\TEMP\*") do RD /S /Q "%%i"@rem Clear IE cache -  (Deletes Temporary Internet Files Only)RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8erase "%LOCALAPPDATA%\Microsoft\Windows\Tempor~1\*.*" /f /s /qfor /D %%i in ("%LOCALAPPDATA%\Microsoft\Windows\Tempor~1\*") do RD /S /Q "%%i"@rem Clear Google Chrome cacheerase "%LOCALAPPDATA%\Google\Chrome\User Data\*.*" /f /s /qfor /D %%i in ("%LOCALAPPDATA%\Google\Chrome\User Data\*") do RD /S /Q "%%i"@rem Clear Firefox cacheerase "%LOCALAPPDATA%\Mozilla\Firefox\Profiles\*.*" /f /s /qfor /D %%i in ("%LOCALAPPDATA%\Mozilla\Firefox\Profiles\*") do RD /S /Q "%%i"pause

I am pretty sure it will run for some time when you first run it :)Enjoy!


You can run Rundll32.exe for IE Options control panel applet and achieve following tasks.


Deletes ALL History - RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255

Deletes History Only - RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1

Deletes Cookies Only - RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2

Deletes Temporary Internet Files Only - RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8

Deletes Form Data Only - RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16

Deletes Password History Only - RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32