How to clear Microsoft Edge browser cache programmatically?

15,903

Solution 1

Go to:

%LOCALAPPDATA%\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\AC\

And delete folders that start with #!.

Solution 2

The location given above I think is wrong. Below is the location for cookies, history and Cache.

directory: C:\Users%username%\AppData\Local\Microsoft\Edge\User Data\Default\Cache

file: C:\Users%username%\AppData\Local\Microsoft\Edge\User Data\Default\Cookies

file: C:\Users%username%\AppData\Local\Microsoft\Edge\User Data\Default\History

Share:
15,903
Carlos J. Ocasio Falcón
Author by

Carlos J. Ocasio Falcón

Updated on June 04, 2022

Comments

  • Carlos J. Ocasio Falcón
    Carlos J. Ocasio Falcón almost 2 years

    Does anyone know how to clear the cache of Microsoft Edge programmatically? (either .Net, script, command line, deleting files)

  • Carlos J. Ocasio Falcón
    Carlos J. Ocasio Falcón over 7 years
    From a command line: rmdir %LOCALAPPDATA%\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbw‌​e\AC\ /s /q
  • Keith
    Keith over 4 years
    This no longer seems to work. Edge is always running. Even if I end the task, it still holds the folders open/active.