-
-
Save ThioJoe/5cc29231c5cb1a8f051df28a69073f77 to your computer and use it in GitHub Desktop.
# A basic script for uninstalling app packages in Windows 10/11, including those pre-installed with Windows | |
# | |
# Note: If you get an error about the script not being allowed to run, the below command will change the execution polciy temporarily for one session only: | |
# Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process | |
# | |
# To execute the script, open a Powershell window to the directory with the script and run the following command using your scripts file name (and don't forget the .\ ) | |
# .\WhateverScriptName.ps1 | |
# ------------------------------------------------------------------------------------------- | |
# Script by ThioJoe - https://github.com/ThioJoe | |
# Display AppX packages that are installed | |
Get-AppxPackage | Select Name, PackageFullName | Out-Host | |
# Pause the script and display instructions | |
Write-Host "Please create a text file called list.txt, then copy the names of the packages you want to uninstall into it, one per line." | |
Write-Host "NOTE: Some of the packages listed above are important. Do not uninstall any packages if you're unsure about their function!" | |
Write-Host "" | |
Write-Host "Then press any key to continue ..." | |
Read-Host | |
# Check if list.txt exists | |
if (-not (Test-Path -Path 'list.txt')) { | |
Write-Host "Error: list.txt not found. Please create it in the same directory as this script, and add the packages you want to uninstall." | |
return | |
} | |
# Read from the file | |
$lines = Get-Content -Path 'list.txt' | |
# Create an array to hold unsuccessful attempts | |
$notFound = @() | |
# Process each line | |
foreach ($line in $lines) { | |
# Trim any leading or trailing white space | |
$line = $line.Trim() | |
# Ignore empty lines | |
if (-not [string]::IsNullOrWhiteSpace($line)) { | |
# Get the package, if it exists | |
$package = Get-AppxPackage | Where-Object { $_.Name -eq $line -or $_.PackageFullName -eq $line } | |
# If package was found, proceed to remove it, otherwise add it to list of apps not found | |
if ($package) { | |
# Try to remove app, and if error occurs display it, but will keep going to the next ones | |
try { | |
$package | Remove-AppxPackage -ErrorAction Stop | |
} | |
catch { | |
Write-Host "Error while trying to uninstall $($line): $_" | |
$notFound += $line | |
} | |
} | |
else { | |
$notFound += $line | |
} | |
} | |
} | |
# If there were unsuccessful attempts, print a warning | |
if ($notFound) { | |
Write-Host "[!!!] WARNING: The following packages were not found and could not be uninstalled:" | |
Write-Host "" | |
# Print each package name that was not found | |
foreach ($package in $notFound) { | |
Write-Host "`t$package" | |
} | |
Write-Host "" | |
Write-Host "Please re-check the names to ensure they exactly match a package's 'Name' or 'PackageFullName'." | |
Write-Host "(Also check if the Full Name was truncated with '...', and if so try the shorter 'Name' string.)" | |
Write-Host "" | |
} | |
# SIG # Begin signature block | |
# MIIplgYJKoZIhvcNAQcCoIIphzCCKYMCAQExDzANBglghkgBZQMEAgEFADB5Bgor | |
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG | |
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAXVqh6uZAIgWiA | |
# 1rwOgNqeLM5jyuNikyay5kjY+dqwvaCCDoMwggawMIIEmKADAgECAhAIrUCyYNKc | |
# TJ9ezam9k67ZMA0GCSqGSIb3DQEBDAUAMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQK | |
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNV | |
# BAMTGERpZ2lDZXJ0IFRydXN0ZWQgUm9vdCBHNDAeFw0yMTA0MjkwMDAwMDBaFw0z | |
# NjA0MjgyMzU5NTlaMGkxCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5EaWdpQ2VydCwg | |
# SW5jLjFBMD8GA1UEAxM4RGlnaUNlcnQgVHJ1c3RlZCBHNCBDb2RlIFNpZ25pbmcg | |
# UlNBNDA5NiBTSEEzODQgMjAyMSBDQTEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAw | |
# ggIKAoICAQDVtC9C0CiteLdd1TlZG7GIQvUzjOs9gZdwxbvEhSYwn6SOaNhc9es0 | |
# JAfhS0/TeEP0F9ce2vnS1WcaUk8OoVf8iJnBkcyBAz5NcCRks43iCH00fUyAVxJr | |
# Q5qZ8sU7H/Lvy0daE6ZMswEgJf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hilgbHwghQ0985yttCxpBEO9NOjUKNvX51jZLW+gkiROELSvWH0c | |
# ytajpynr5K3h9KYPAj7ZRtrwrLXsPMDX9S6JQQt5gWTtAC1JwFxuzboIqtHPaU6h | |
# R1uybpFlrUKBxeWHiw6VEemo9S9uUPJMUSDJeuETr3hVVg8oHVlpR5fUS0KQUCAk | |
# F9bcEAorlC7NgVgZG/joRAE0hHiNCnIrq6xPH3E0TasU4J3gdKfZiCktCCq3JcNr | |
# fZTPU3oqr0pUJpJnHEaCm9oYnihAHXt5l1sG5V0wIXnV0DyqDxZ+duxGRK53UjiR | |
# vrwqUOLHH7xED3zFBwKNhtfAOt94KLfQIFvUJXOeADtlPg2oo3FSkx0pd5KuDXpm | |
# 8YHD2HYqVbc3LipSWLb05SPsDsmL2rJOBsTMGttqtDbNauvaMZRAsO8D | |
# SIG # End signature block |
ThioJoe, you are awesome! This was very helpful and good to know. So glad to know that we have people trying to activately stop the march of bloatware... 🎊
Epic script, bloatware on Windows is incredibly annoying,
For easy de-bloat, someone could probably make an “installer” that removes the bloat, and submit that to winget.
I made one that brings back the classic context menu for windows explorer, so it’s just a matter of running the appropriate winget install command.
@DavidArsene How would someone use Remove-AppxProvisionedPackage
?
@srshah27
Get-AppxProvisionedPackage -Online | Out-GridView -PassThru | Remove-AppxProvisionedPackage -Online
Thio, thanks for sharing your script!
I'm currently using a "baked in" array along with wildcards to remove my most unwanted packages. The wildcards help remove all packages that match instead of listing them individually.
I just "comment out" the ones I don't want to remove, thus keeping them on hand within the script. People can add new items in the array as needed which you're achieving with that list.txt file.
I've even commented a "friendly name" after the line, or listed each package that would be removed with using the given wildcard option.
I'm using the PackageName over the PackageNameFull as it is shorter and easier to read. However, both methods should technically still work.
I have a combined script that removes/disables the following:
- Remove-AppxProvisionedPackage
- Remove-WindowsPackage
- Remove-WindowsCapability
- Disable-WindowsOptionalFeature
I'm not a programmer by any sense of the word, but expended blood, sweat and tears just getting these amateur scripts that I use.
Example:
$Packages =
'*549981C3F5F10*', # Cortana
'*Bing*', # Money, Sports, News, Finance & Weather
#'*Calculator*',
#'*Camera*',
'*CommunicationsApps*', # Mail & Calendar
'*Feedback*',
'*Gaming*',
'*GetHelp*',
'*GetStarted*', # Tips app
#'*SecHealthUI*', # Windows Defender
'*Maps*',
'*MixedReality*',
'*OfficeHub*',
#'*OneDrive*',
'*MSPaint*',
'*People*',
'*Phone*', # Phone Companion
#'*ScreenSketch*', # Snipping Tool
'*Skype*',
'*Solitaire*',
#'*SoundRecorder*',
#'*StickyNotes*',
'*Teams*',
'*todos*',
'*WindowsAlarms*',
'*Xbox*',
'*Zune*'
ForEach($Package in $Packages){
Get-AppxProvisionedPackage -Online | Where-Object {$_.PackageName -like "$Package"} | Remove-AppxProvisionedPackage -Online -AllUsers
}
Hello Thio, just three more quick thoughts I wanted to share...
1st:
You could automate the output to both create and open the file making it easier for the User to edit the list.
The following would provide a clean output to the file: Out-File
$AppxList = (Get-AppxPackage | Select-Object Name).Name | Out-File .\list.txt
Either of the following opens the text file with the default text editor (Notepad): Start-Process
Start-Process -FilePath .\list.txt
orStart-Process .\list.txt
orStart-Process notepad.exe .\list.txt
2nd:
Consider using an exclusion list to filter out packages when building a new list for removals. This would require a more manual process to prevent accidental changes to it. The exclusion list remains static and not overwritten, while the list of packages for removal is overwritten with each output. The User can just copy and rename the output file and edit it manually.
3rd:
Consider combining the ability to remove both AppxPackage's and AppxProvisionedPackage's:
- Get-AppxPackage : Gets a list of the app packages that are installed in a user profile.
- Get-AppxProvisionedPackage: Gets information about app packages (.appx) in an image that will be installed for each new user.
Why did you sign this with SHA-1 when the certificate supports up to SHA-256? 🤔
Why did you sign this with SHA-1 when the certificate supports up to SHA-256? 🤔
Ah good catch, I guess for some reason the Digicert Signing Tool signs with Sha-1 by default. I've just updated with a version using sha256
Why did you sign this with SHA-1 when the certificate supports up to SHA-256? 🤔
Ah good catch, I guess for some reason the Digicert Signing Tool signs with Sha-1 by default. I've just updated with a version using sha256
Ha. I realized just now that youtube-dl Easy Script.ps1 was signed using the same algorithm.
is there a way just run it etc intune and run it without doing anything?
is there a way just run it etc intune and run it without doing anything?
If you just want to list the installed packages, you can simply run this command:
Get-AppxPackage | Select Name, PackageFullName | Out-Host
Just use
Get-AppxPackage | Out-GridView -PassThru | Remove-AppxPackage
which opens a GUI list where you can select apps to remove. There's alsoRemove-AppxPackage -AllUsers
andRemove-AppxProvisionedPackage
which are required in some cases to actually delete the apps and free up space.