How to Clear the Windows AppX Package Deployment Cache via PowerShell

The UWP Application Bottleneck

Unlike traditional Win32 applications (.exe and .msi files), modern Windows 10 and Windows 11 rely heavily on AppX and MSIX packages—the Universal Windows Platform (UWP) apps distributed via the Microsoft Store or sideloaded via enterprise deployment tools. This includes critical built-in applications like Calculator, Photos, and the Settings app itself.

When an AppX package is installed or updated, Windows does not simply extract files to Program Files. It registers the application within a highly complex deployment database, linking the app to the specific user’s profile and caching its metadata. If this deployment cache becomes corrupted (often due to an interrupted Microsoft Store update or a messy Sysprep operation during OS imaging), the results are incredibly frustrating.

Users will click the Start menu, attempt to open the Calculator or Photos app, and the app will instantly flash on the screen and crash, or it will remain grayed out with an underline. Running standard sfc /scannow commands will not fix this. To restore functionality to modern Windows apps, you must forcefully clear the AppX Package Deployment Cache using PowerShell.

Locating the AppX Repositories

AppX deployment state data is scattered across several deeply protected registry keys and hidden system folders, primarily within the C:\ProgramData\Microsoft\Windows\AppRepository\ directory. This folder contains SQLite databases that map package names to their physical installation paths.

Because the Windows kernel heavily protects this directory, you cannot simply delete it. You must use PowerShell to forcefully re-register the deployment state of the applications.

Resetting the AppX Cache via PowerShell

You must open PowerShell with elevated Administrator privileges. The process involves identifying all installed AppX packages and forcing Windows to completely bypass the corrupted cache by reading the raw AppxManifest.xml file for every single application.

Execute the following script:

Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}

Understanding the Command:

  • Get-AppXPackage -AllUsers: This queries the system for every UWP app installed across all user profiles, ignoring the corrupted cache state.
  • Add-AppxPackage -Register: Instead of trying to download or install the app again, this command points directly to the physical XML manifest file already sitting on the hard drive.
  • -DisableDevelopmentMode: This crucial flag forces Windows to overwrite any existing (and corrupted) deployment state in the registry with the clean data from the XML file.

Handling the “In Use” Errors

As the script runs, you will see a flurry of yellow text on your screen. You will also likely see several bright red error messages stating that the deployment failed because “resources are currently in use.”

You can completely ignore these red errors. These errors simply indicate that the script attempted to reset the cache for an application that is currently actively running (such as Cortana, the Start Menu Experience, or the PowerShell window itself). The script will skip the active app and successfully reset the dozens of broken, inactive apps.

The Final Cleanup (App Store Reset)

While the PowerShell command fixes the local AppX deployment cache, you should also flush the Microsoft Store’s download cache to ensure future updates do not immediately corrupt the system again.

Press Win + R to open the Run dialog box, type the following command, and press Enter:

wsreset.exe

A blank command prompt window will appear. It will sit there for about 15 to 30 seconds as it aggressively purges the Store cache. When it finishes, the Microsoft Store app will automatically launch. Your UWP applications (like Calculator and Photos) are now fully re-registered and will open instantly without crashing.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.