How to remove (all) Windows 8 apps using PowerShell
Apps are clearly a focus on Windows 8, not only because the operating system boots into the "apps-interface" on startup by default, but because most of the marketing for the operating system puts it in focus as well. That's however just one side of Windows 8, and I'm not entirely sure if concentrating all efforts on those features is the smartest move by Microsoft.
Anyway, if you are not using the apps at all, or want to remove apps from user profiles so that they cannot launch them, then you may have discovered that it is not really a straightforward operation.
Things get a bit easier in Windows 8.1 with its batch uninstallation feature - right-click multiple apps and select uninstall in the end - but it is still far from what I would consider comfortable.
The Windows PowerShell may look intimidating, or like just another shell environment or command line to most users. It is actually very powerful, and one of the things that you can use it for is to remove some or all apps installed on a Windows 8 system.
PowerShell and Apps
You do need to start the PowerShell before you can get started. Do the following to do just that:
- Press the Windows-key and enter PowerShell using the keyboard.
- Right-click the PowerShell result and select to "run as administrator" from the options.
On to the commands:
Get Commands
Get retrieves app-related information from users on the local PC or a remote domain.
Get-AppxPackage -User [Username] lists all apps installed by the user [username]. [username] can be a domain\user, an email address, a user_name, or a SID-string.
Get-AppxPackage -AllUsers lists all apps installed by users on the system
Get-AppxPackage -Name [name] returns all apps that match [name]. You can use wildcards (*) in the command.
Get-AppxPackage -Publisher [publisher name] returns all apps that are installed by the selected publisher(s). Wildcards are again permitted.
Note that it is possible to combine queries.
Example Get queries:
- Get-AppxPackage -Publisher *Microsoft* returns all apps published by Microsoft, and any other publisher that uses Microsoft in its name (likely none).
- Get-AppxPackage -user Martin returns all apps installed under the user account Martin.
- Get-AppxPackage -name *Halo* returns all apps that have Halo in their name.
- Get-AppxPackage -name *Facebook* -User domain/user1 returns all installed apps with Facebook in their name from user1 on the remote computer domain.
Remove Commands
Remove works very similar to Get, but it offers additional parameters.
Remove-AppxPackage [package name] removes [package name] from the account of the currently signed in user.
Remove-AppxPackage [package name] -Confirm does the same as above, but displays a confirmation prompt before the command is executed.
Remove-AppxPackage [package name] -WhatIf displays what would happen if you would run the command.
Example Remove queries:
- Remove-AppxPackage 31098nishrotech.readiy_3.1.1.12_neutral___ap1yy96n767gr Removes the selected package from the current user account
How to remove all Metro apps from all users
Get-AppxPackage -AllUsers | Remove-AppxPackage
Microsoft has published a script that removes all Windows Store apps in Windows 8 as well. You can download it from this Technet page.
Additional information about App installation cmdlets are available on Technet as well.
Advertisement
Ok here is question for you. I have two problem apps which wont display the right click uninstall option or run. I have run this command (Remove-AppxPackage [package name] -Confirm) using Powershell which then fails to complete the uninstall.
Any ideas?
This is one of the first things I do. The default apps are so rubbish. I usually replace them with desktop apps. Thanx for the article.
First, if you have problems with some “Staged” apps not being removed:
> Download psexec from sysinternals tools, written by Mark Russinovich
> To get rid of all of them, run in a regular admin/elevated command prompt (not powershell):
> psexec -s powershell -c “get-appxpackage | remove-appxpackage”
— http://stackoverflow.com/questions/13865930/how-to-uninstall-an-app-that-another-user-installed
Second, does anyone know how to get rid of the following?
windows.immersivecontrolpanel, WinStore, BrowserChoice
The error message is:
error 0x80070032: AppX Deployment Remove operation on package BrowserChoice_6.2.0.0_neutral_neutral_cw5n1h2txyewy from: C:\Windows\BrowserChoice failed. This app is part of Windows and cannot be uninstalled on a per-user basis. An administrator can attempt to remove the app from the computer using Turn Windows Features on or off. However, it may not be possible to uninstall the app.
But I can’t find any of those in the “Turn Windows Features on or off” settings.
Does anyone know how much space you save from deleting all the metro apps on one profile?
Nothing. It’s like removing links, not files. All files stand on hard disk.
Jay I do not have a figure for you but it is likely only a couple of hundred Megabytes tops.
Great tip. The way I have been doing this is through “Windows 8 Manager” by Yamicsoft. This software gives me a GUI where I can batch uninstall every app I don’t need or want. Great tip though for those who don’t want Windows 8 Manager.
Remove just removes the tiles or uninstalls apps freeing disk space ?
Frees up disk space.
Wrong, it doesn’t free up anything, only remove from start menu.
All files remain on hard disk.
If you don’t trust me, try to write this on powershell:
Get-AppxPackage -AllUsers| Foreach {Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)\AppXManifest.xmlâ€}
All apps will be again on system.
Excellent article, as always, Martin.
…
Wow an amazing find, many thanks – first thing I will do on my Win8 systems when I get home is get rid of all the Metro apps. I don’t use any of them and probably never will.
how do we reinstall something that we have removed?
Say bing news/ search, I had removed and now I want it back.
Thanks.
I think you can install all from the store again.
very useful info. thanks.
The first command
“Get-AppPackage -User [Username] ” has an “x” missing. so it is not working.
It Should be
“Get-AppxPackage -User [Username], that is, appx instead of just app
Thanks.
Thanks, corrected.