Skip to content

Instantly share code, notes, and snippets.

@ave9858
Last active June 8, 2026 07:09
Show Gist options
  • Select an option

  • Save ave9858/c3451d9f452389ac7607c99d45edecc6 to your computer and use it in GitHub Desktop.

Select an option

Save ave9858/c3451d9f452389ac7607c99d45edecc6 to your computer and use it in GitHub Desktop.

Uninstall Microsoft Edge

Important

Working on the latest supported Windows versions. Run Windows Update before following this guide.

1. Open Powershell > RUN AS ADMIN

2. Paste in irm https://gist.github.com/ave9858/c3451d9f452389ac7607c99d45edecc6/raw/UninstallEdge.ps1 | iex and press enter

3. Microsoft Edge will be completely uninstalled.

Note

The Microsoft Edge Update service might remain, this is normal as it is required for updating WebView2.

# SPDX-FileCopyrightText: Copyright (c) 2023 ave9858 <edging.duj6i@simplelogin.com>
# SPDX-License-Identifier: CC0-1.0
$ErrorActionPreference = "Stop"
$regView = [Microsoft.Win32.RegistryView]::Registry32
$microsoft = [Microsoft.Win32.RegistryKey]::OpenBaseKey([Microsoft.Win32.RegistryHive]::LocalMachine, $regView).
OpenSubKey('SOFTWARE\Microsoft', $true)
$edgeUWP = "$env:SystemRoot\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe"
$uninstallRegKey = $microsoft.OpenSubKey('Windows\CurrentVersion\Uninstall\Microsoft Edge')
if ($null -eq $uninstallRegKey) {
Write-Error "Edge is not installed!"
}
$uninstallString = $uninstallRegKey.GetValue('UninstallString') + ' --force-uninstall'
$tempPath = "$env:SystemRoot\SystemTemp"
if (-not (Test-Path -Path $tempPath) ) {
$tempPath = New-Item "$env:SystemRoot\Temp\$([Guid]::NewGuid().Guid)" -ItemType Directory
}
$fakeDllhostPath = "$tempPath\dllhost.exe"
$edgeClient = $microsoft.OpenSubKey('EdgeUpdate\ClientState\{56EB18F8-B008-4CBD-B6D2-8C97FE7E9062}', $true)
if ($null -ne $edgeClient.GetValue('experiment_control_labels')) {
$edgeClient.DeleteValue('experiment_control_labels')
}
$microsoft.CreateSubKey('EdgeUpdateDev').SetValue('AllowUninstall', '')
# Don't you have anything better to do?
Copy-Item "$env:SystemRoot\System32\cmd.exe" -Destination $fakeDllhostPath
[void](New-Item $edgeUWP -ItemType Directory -ErrorVariable fail -ErrorAction SilentlyContinue)
[void](New-Item "$edgeUWP\MicrosoftEdge.exe" -ErrorAction Continue)
Start-Process $fakeDllhostPath "/c $uninstallString" -WindowStyle Hidden -Wait
[void](Remove-Item "$edgeUWP\MicrosoftEdge.exe" -ErrorAction Continue)
[void](Remove-Item $fakeDllhostPath -ErrorAction Continue)
if (-not $fail) {
[void](Remove-Item "$edgeUWP")
}
Write-Output "Edge should now be uninstalled!"
@1yjt

1yjt commented May 4, 2025

Copy link
Copy Markdown

Follow all steps of the guide, don't quit when edge has disappeared.

DONT FORGET TO REMOVE THE MICROSOFT EDGE REGISTRY KEY AFTERWARDS OR ELSE YOU WILL WASTE MANY HOURS OF YOUR LIFE FIXING WINDOWS UPDATE!!!!!!!!!!!!

Please explain.

please what steps ate u talkin about i just ran the script and got this
Screenshot 2025-05-04 232032

@ave9858

ave9858 commented May 5, 2025

Copy link
Copy Markdown
Author

That comment is outdated, it's based on an old version of the guide which had you do a different set of steps manually instead of running a script. Running the script can't cause any issues like that

@TommyCowley101

Copy link
Copy Markdown

quick question, this script works everywhere right? all around the world

ghost commented Sep 29, 2025

Copy link
Copy Markdown

quick question, this script works everywhere right? all around the world

not sure about 24h2 and 25h2
works fine on 23h2
haven't tested on 10

ghost commented Sep 29, 2025

Copy link
Copy Markdown

Your doing way to much you just need to run this i tested it and it dose work

New-Item "$env:SystemRoot\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe" -ItemType Directory
New-Item "$env:SystemRoot\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftEdge.exe"

cmd /c ((Get-ItemProperty 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge').UninstallString + ' --force-uninstall')

@ave9858

ave9858 commented Sep 29, 2025

Copy link
Copy Markdown
Author

That's not going to work in all cases, the script is based on reverse engineering the installer not random guessing

ghost commented Sep 29, 2025

Copy link
Copy Markdown

@ave9858 go make a vm and run that script in admin powershell and you well see it well work i dont know why if you have that file in that folder it allows you to uninstall edge with its own uninstaller even if your not in the eu but it works

@Laicure

Laicure commented Sep 30, 2025

Copy link
Copy Markdown

Reinstalled Edge via MS Store on latest Win10 release. Ran the script and it didn't do anything, just the string outputs. Weird! This perfectly works on my Win10 installation before 😐

@ave9858

ave9858 commented Sep 30, 2025

Copy link
Copy Markdown
Author

@ave9858 go make a vm and run that script in admin powershell and you well see it well work i dont know why if you have that file in that folder it allows you to uninstall edge with its own uninstaller even if your not in the eu but it works

I've obviously tested it, and it does not work. This script was tested and bypasses added based on what actually works. You need to do proper testing before commenting

@Laicure

Laicure commented Oct 1, 2025

Copy link
Copy Markdown

Reformatted my system, it works on Win11!
image

@sayyidzayan

Copy link
Copy Markdown

how do i reinstall it?

@sylv256

sylv256 commented Oct 20, 2025

Copy link
Copy Markdown

i can't reinstall edge now, thanks 'ave'

@baldmanwithglasses

Copy link
Copy Markdown

im not a dev of this project or anything but can i ask if you installed another browser before uninstalling edge?

@MLSci

MLSci commented Apr 20, 2026

Copy link
Copy Markdown

Error: Invoke-Expression: You cannot call a method on a null-valued expression.

ghost commented Apr 21, 2026

Copy link
Copy Markdown

Error: Invoke-Expression: You cannot call a method on a null-valued expression.

Check if you can access

https://gist.github.com/ave9858/c3451d9f452389ac7607c99d45edecc6/raw/UninstallEdge.ps1

Itself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment