Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Windows logo Windows Cleanup

A PowerShell script for performing system cleanup on Windows 10 and Windows 11. It removes a broad range of optional apps and media extensions, disables selected Windows integrations and telemetry components, clears temporary and update files, and provides additional system-cleanup actions.

This project is intended as a companion tool for configuring Windows and is especially useful after a clean OS installation. It automates repetitive setup work and provides one place for operations that would otherwise require manual changes.

🛠️ Recommended setup

For a more complete Windows setup, run O&O ShutUp10++ before using this script. It covers a wide range of privacy and system settings, complementing this script’s component removal, integration disabling, and system cleanup capabilities.

Download the latest version from the official download page. This repository also provides an import-ready configuration preset at oosu/oosu10_preset_for_v3.2.1111.cfg. The preset is only a recommended starting point and can be adjusted to your preferences.

✨ Features

  • Removes selected Appx/MSIX packages for existing users and deprovisions them for future users.
  • Covers preinstalled applications, media extensions, Xbox components, OneDrive, Windows Help, telemetry services, scheduled tasks, diagnostic logs, temporary files, update caches, component-store cleanup, and restore-point removal.
  • Uses stable package identities and supports historical and current Windows 10/11 package names.
  • Resolves system locations from Windows environment paths and handles native and 32-bit registry views where required.
  • Preserves protected or non-removable packages and safely skips components unavailable on the current Windows release.
  • Supports repeatable execution, automatic elevation, PowerShell host selection, and manual update checks through GitHub Releases.

🖼 Screenshot

PowerShell console screenshot

⚠️ Before you run it

This utility intentionally removes Windows components and changes system policies. Some actions can remove personal OneDrive data, media codec support, restore points, diagnostic facilities, or applications you may still need.

It is recommended to create a restore point or system backup before using the script on an important installation. Read every warning and confirmation shown by the utility; do not use Run all unless you understand the consequences of every included action.

🧩 Requirements

  • Windows 10 or Windows 11
  • Windows PowerShell 5.1 or PowerShell 7+
  • Administrator rights

Both 32-bit and 64-bit Windows installations are supported. The BAT runner selects PowerShell 7 when available, otherwise falls back to the appropriate native Windows PowerShell host and requests elevation automatically.

📁 Files

File Description
scripts/windows_cleanup.ps1 Main cleanup script
scripts/RUN_windows_cleanup.bat Runner for the cleanup script
oosu/oosu10_preset_for_v3.2.1111.cfg Recommended profile for import into O&O ShutUp10++

Keep the .ps1 and .bat files in the same folder. The runner resolves the PowerShell script relative to its own location.

🚀 Usage

Run:

RUN_windows_cleanup.bat

Accept the Windows UAC prompt, choose an action by entering its number, and press ENTER. Review the description and confirmation before allowing an operation to proceed.

❓ Troubleshooting

Q: The window reports that administrator privileges are required.
A: Run RUN_windows_cleanup.bat, not the PS1 directly. The runner requests elevation automatically.

Q: I see SKIP/INFO: ... is not installed or provisioned.
A: The component is already absent, was never included in that Windows edition, or uses no identity listed by the utility. This is not an error.

Q: A package reports NonRemovable.
A: Windows marks that package as protected. The utility leaves it intact instead of trying to modify protected system directories.

Q: An app or Windows feature returns after a major update.
A: Feature updates can restore components, policies, services, permissions, or package provisioning. Run the current version of the utility again and review the available actions.

Q: Xbox cleanup succeeded but another Windows account still has Game Bar settings enabled.
A: User-level registry values apply only to the account that launched the script. Run the Xbox cleanup from the other account if its settings must also be changed; machine policies already apply to all users.

Q: Why is my OneDrive folder still present after OneDrive cleanup?
A: Folders that may contain personal data are removed only after explicit confirmation. Inspect their contents first, then run the action again if they should be deleted.

Q: The update check cannot reach GitHub or find a release.
A: Verify the internet connection and confirm that the repository has a published GitHub Release. The cleanup actions continue to work offline.

About

Script for Windows to remove bloatware, unwanted components, and leftovers

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages