I want to remove an app from Windows 10 Professional x64.
The app was installed via Microsoft Store.
By saying "remove" I don't mean Remove-AppxPackage
as this command obviously does not remove the app from the system.
I don't know the specific word, every software has its own handles e.g. in Firefox prefs it is called sanitize
. It may be purge, wipe, clear, clean.
The goal is to actually eliminate every single bit this app has added to or changed in the system, every folder, every registry entry and any cached files.
Or: I'd like to reset the system to the state before installing an app without deleting any other changes? (So a differentiating VHD is not the right solution, neither is System Restore or Imaging)
Or: At least I'd like to make Windows 10 forget the installation of this app, so that a reinstallation would require installing a full new database for this app (having the same files twice included).
What I do not want is to install any additional third-party software to do this.
Microsoft and Sysinternals are fine.
By simply doing Remove-AppxPackage
the registry hives and
- C:\Program Files\WindowsApps
- C:\ProgramData\Microsoft\Windows\AppRepository\Packages
- C:\Users\Administrator\AppData\Local
- C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps
- C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps\Backup
- C:\Users\Administrator\AppData\Local\Temp
- C:\Users\Administrator\AppData\Roaming
- C:\Users\All Users\Microsoft\Windows\AppRepository
- C:\Users\All Users\Microsoft\Windows\AppRepository\Packages
- C:\Windows\Prefetch
are not cleansed.
Get-AppxPackage *foo* | Remove-AppxPackage
just uninstalls the app but leaves all the junk in case you ever would like to reinstall the app again. (Which is what I will do)
Remove-AppxPackage PackageFullName
is the same command as above.
Using the native uninstaller also is not clean.
DISM.exe /Online /Remove-AppxProvisionedPackage
"removes" built-in-apps only.
I have to admit that I'm not really into PowerShell yet. Basics are fine, though. CMD ftw
Of course one could simply write a batch to delete all the folders. But what about the registry entries, shell extensions, etc.? Do I have to backup my registry and filter the relevant changes before installing any new software for having the opportunity to uninstall and completely remove it if needed? Why does Windows not ask the user whether the software should remain on the drive?
WindowsApps
directory then you wouldn't be able to reinstall the applications.