


:: If you choose to delete the $WINDOWS.~BT folder on Windows 10, you won’t be able to downgrade :: about that last Windows upgrade process and may also contain the installation files for that update. :: The $GetCurrent directory is created during the upgrade process. :: but will remove lots of things nonetheless) :: Remove temp files (will probably log warnings for files that are in use, :: Disable Hibernation (removes hiberfil.sys)

:: This allows cleaning things such as `Windows.old` and other large, unnecessary directories. :: Run `cleanmgr /SAGESET:123` from cmd.exe and choose everything you want to clean before running this script. :: Run this script as admin (required to run `Dism.exe` among other things). :: as you can't roll back service packs and updates afterwards. :: It is strongly suggested to make a full-disk backup of your Windows partition before running this script, Useful for Windows installations in space-constrained environments, such as a small Boot Camp :: Reclaims Windows disk space in a "destructive" manner (can't uninstall service packs and updates afterwards, etc.). Learn more about bidirectional Unicode characters To review, open the file in an editor that reveals hidden Unicode characters. This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below.
