In this tutorial, I will show you how to delete Microsoft Edge browsing history using the Windows command line. This method is useful if you want to automate browser cleanup, troubleshoot Edge issues, or quickly remove cached data without opening the browser.
Microsoft Edge is Chromium based, which means browsing data is stored locally and can be removed manually using simple commands.
Delete Microsoft Edge Browsing History Using Command Line
Important: Microsoft Edge must be completely closed before running these commands.
- Click Start -> Run
- Type cmd
- Click OK
Close Microsoft Edge
taskkill /IM msedge.exe /F
Delete Microsoft Edge Cache
rd /s /q "%LocalAppData%\Microsoft\Edge\User Data\Default\Cache"
Delete Microsoft Edge Browsing History
del "%LocalAppData%\Microsoft\Edge\User Data\Default\History"
Delete Cookies and Site Data
rd /s /q "%LocalAppData%\Microsoft\Edge\User Data\Default\Cookies"
Create a Batch File to Automate Edge History Deletion
You can automate this process by creating a simple batch file.
- Create a new text file on your desktop
- Open it with Notepad or another text editor
- Paste the following code into the file:
@echo off cls title Delete Microsoft Edge Browsing History echo Started at %time% echo. taskkill /IM msedge.exe /F rd /s /q "%LocalAppData%\Microsoft\Edge\User Data\Default\Cache" del "%LocalAppData%\Microsoft\Edge\User Data\Default\History" echo. echo Microsoft Edge history deleted echo Ended at %time% pause exit
- Save the file as delete-edge-history.bat
- Double click the file to run it
That is all there is to it. You can now quickly delete Microsoft Edge browsing history manually or automate the process using a batch file.