How to Delete Windows.old and $Windows.~BT folders in Windows 10
When you refresh Windows 10, upgrade to Windows 10, or custom install Windows 10 on the same partition as the previous Windows installation without doing a clean install, then you will have a C:\Windows.old folder in your new installation afterwards.
If you choose to “Keep nothing”, your personal files are temporarily saved to the Windows.old folder, and will be automatically deleted in 10 days after the date you upgraded by default.
The Windows.old folder will also contain a copy of the previous Windows installation, and can be quite large in size.
See also:
- Delete your previous version of Windows | Microsoft Support
- Go back to Windows 8.1 | Microsoft Support
This tutorial will show you how to delete the Windows.old and $Windows.~BT folders in the root directory of the Windows drive when you do a refresh, upgrade install, or custom install of Windows 10.
You must be an administrator to do the steps in this tutorial.
Be sure to copy any files that you may want out of the Windows.old folder before you delete it. Once deleted, they are permanently gone.
If you delete the Windows.old, $Windows.~BT, and/or $Windows.~WS folders, you will no longer be able to go back to the previous version of Windows.
If you delete the Windows.old and $Windows.~BT folders, it is recommended to also delete the $Windows.~WS folder to free up additional hard drive space.
If the Windows.old folder was unable to be removed using either option below, then take ownership of the Windows.old folder and all contents, and try again.
* Owner of Files and Folders - Change in Windows 10
* Take Ownership - Add to Context Menu in Windows 10
For a Windows 11 version of this tutorial, see: Delete Windows.old Folder in Windows 11
Contents
- Option One: Delete "Windows.old" and "$Windows.~BT" Folders in Disk Cleanup
- Option Two: Delete "Windows.old" and "$Windows.~BT" folders in Elevated Command Prompt
- Option Three: Delete "Windows.old" Folder in a Command Prompt at Boot
- Option Four: (recommended) Delete "Windows.old" and "$Windows.~BT" Folders in Storage Settings
- Option Five: (recommended) Delete "Windows.old" and "$Windows.~BT" Folders in Storage Sense Settings
- Option Six: Delete "Windows.old" , "$Windows.~BT", or "$Windows.~WS" Folders using BAT file
EXAMPLE: Windows.old Folder
1 Press the Win + R keys to open the Run dialog, type cleanmgr into Run, and click/tap on OK to open Disk Cleanup.
2 If you have more than one drive or partition on your PC, then select the Windows C: drive, and click/tap on OK. (see screenshot below)
3 Click/tap on the Clean up system files button. (see screenshot below)
4 If prompted by UAC, click/tap on Yes.
5 Repeat step 2 above.
6 Check the Previous Windows installation(s) box, and click/tap on OK. (see screenshot below)
7 Click/tap on Delete Files to confirm. (see screenshot below)
8 When Disk Cleanup finishes, the C:\Windows.old folder will be deleted.
1 Open an elevated command prompt.
2 Copy and paste the commands below into the elevated command prompt one at a time, and press Enter after each command. (see screenshot below)
If you had another say windows.old.(1) folder that you also wanted to delete, then you could repeat these commands substituting that name instead of windows.old to also delete it.
takeown /F "C:\Windows.old" /A /R /D Y
icacls "C:\Windows.old" /grant *S-1-5-32-544:F /T /C /Q
RD /S /Q "C:\Windows.old"
AND
takeown /F "C:\$Windows.~BT\*" /A /R /D Y
icacls "C:\$Windows.~BT\*.*" /grant *S-1-5-32-544:F /T /C /Q
RD /S /Q "C:\$Windows.~BT"
3 When finished, you can close the elevated command prompt if you like.
1 Boot to a command prompt at boot.
The Windows 10 drive letter may not always be C: at boot like it is while Windows is started, so be sure to verify its drive letter before doing the command in step 3 below for this to work.
A) Typediskpart
into the command prompt, and press Enter. (see screenshot below)
B) Typelist volume
into the command prompt, and press Enter.
C) From the listed volumes, look for and verify the drive letter of your Windows 10 drive.
D) In the command prompt, typeexit
, and press Enter.
A) Type the command below into the command prompt, and press Enter. (see screenshot below)B) Close the command prompt.
RD /S /Q "D:\Windows.old"
Be sure to substitute D in the command below with the actual drive letter of your Windows 7 drive as displayed from step 2 above instead. If you had another say windows.old.(1) folder that you also want to delete, then you could repeat this command substituting that name instead of Windows.old to also delete it.
4 Click/tap on the Continue button to restart the computer and continue to Windows 10. (see screenshot below)
1 Open Settings, and click/tap on the System icon.
2 Click/tap on Storage on the left side, and click/tap on Temporary files under the Local Disk C: drive under Storage on the right side. (see screenshot below)
If you do not see Temporary files, click/tap on the Show more categories link to see it.
3 Check the Previous Windows installation(s) box, uncheck anything you don't want deleted, and click/tap on the Remove files button when ready. (see screenshot below)
4 When finished, you can close Settings if you like.
This option is only available starting with Windows 10 build 16226.
1 Open Settings, and click/tap on the System icon.
2 Click/tap on Storage on the left side, and click/tap on the Configure Storage Sense or run it now link under Storage on the right side. (see screenshot below)
3 Check the Delete previous versions of Windows box at the bottom, uncheck anything you don't want deleted, and click/tap on the Clean now button. (see screenshots below)
4 When finished, you can close Settings if you like.
This option has been provided by Paul Black.
1 Click/tap on the Download button below to download the Delete_Windows.old_$WINDOWS.~BT_$WINDOWS.~WS_Folders file.
Download
(Contents of .bat file for reference.)
Code:@echo off :: ######################################################################################################### :: # Title : Delete Windows.old, $WINDOWS.~BT, or $WINDOWS.~WS Folders # :: # Created By: Paul Black at TenForums.com/members/paul-black.html # :: # Created In: December 2020 # :: # Tutorial : https://www.tenforums.com/tutorials/2066-delete-windows-old-folder-windows-10-a.html # :: ######################################################################################################### title Delete System Folders - Written by Paul Black. mode con: cols=80 lines=26 & color 17 set "params=%*" cd /d "%~dp0" && ( if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs") && fsutil dirty query %systemdrive% 1>nul 2>nul || ( echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~sdp0"" && %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && Exit /b) %windir%\system32\reg.exe query "HKU\S-1-5-19" 1>nul 2>nul || ( echo. & echo ERROR: This Batch file MUST be run in an ELEVATED cmd prompt [ Administrator ] & echo. & echo Right-click the Batch file and click ^<Run as administrator^>. & echo. & echo ^>Press ANY key to EXIT . . . & pause >nul & goto :Exit ) set "Win_Old=%SystemDrive%\Windows.old" set "Win_BT=%SystemDrive%\$WINDOWS.~BT" set "Win_WS=%SystemDrive%\$WINDOWS.~WS" :Options echo. & echo ============================================================================== echo Delete Windows.old, $WINDOWS.~BT, or $WINDOWS.~WS Folders [ Windows 10 ONLY ]. echo ============================================================================== echo. & echo Options: echo. & echo [0] EXIT this Program. echo. & echo [1] Delete the Windows.old Folder. echo [2] Delete the $WINDOWS.~BT Folder. echo [3] Delete the $WINDOWS.~WS Folder. echo. & echo ============================================================================== echo. CHOICE /N /C 0123 /M ">Enter an Option:" if %errorlevel%==4 goto Win_WS if %errorlevel%==3 goto Win_BT if %errorlevel%==2 goto Win_Old if %errorlevel%==1 goto Exit goto :Options :Win_Old if not exist "%SystemDrive%\Windows.old" ( echo. & echo The folder does NOT exist. echo. & echo ^>Press ANY key to return to the Options . . . & pause >nul cls & goto :Options ) else ( echo. & echo Processing . . . takeown /F "C:\Windows.old" /A /R /D Y icacls "C:\Windows.old" /grant *S-1-5-32-544:F /T /C /Q rmdir /S /Q "C:\Windows.old" >nul 2>&1 echo. & echo Processing COMPLETE. echo. & echo ^>Press ANY key to return to the Options . . . & pause >nul cls & goto :Options ) :Win_BT if not exist "%SystemDrive%\$WINDOWS.~BT" ( echo. & echo The folder does NOT exist. echo. & echo ^>Press ANY key to return to the Options . . . & pause >nul cls & goto :Options ) else ( echo. & echo Processing . . . takeown /F C:\$Windows.~BT\* /A /R /D Y icacls C:\$Windows.~BT\*.* /T /grant administrators:F rmdir /S /Q C:\$Windows.~BT\ >nul 2>&1 echo. & echo Processing COMPLETE. echo. & echo ^>Press ANY key to return to the Options . . . & pause >nul cls & goto :Options ) :Win_WS if not exist "%SystemDrive%\$WINDOWS.~WS" ( echo. & echo The folder does NOT exist. echo. & echo ^>Press ANY key to return to the Options . . . & pause >nul cls & goto :Options ) else ( echo. & echo Processing . . . takeown /F C:\$Windows.~WS\* /A /R /D Y icacls C:\$Windows.~WS\*.* /T /grant administrators:F rmdir /S /Q C:\$Windows.~WS\ >nul 2>&1 echo. & echo Processing COMPLETE. echo. & echo ^>Press ANY key to return to the Options . . . & pause >nul cls & goto :Options ) :Exit
2 Save the Delete_Windows.old_$WINDOWS.~BT_$WINDOWS.~WS_Folders file to your desktop.
3 Unblock and run the Delete_Windows.old_$WINDOWS.~BT_$WINDOWS.~WS_Folders file.
4 Type the number for the option you want deleted. (see screenshot below)
That's it,
Shawn Brink
Related Tutorials
- How to Restore Files from Windows.old Folder in Windows 10
- How to Delete $Windows.~WS folder in Windows 10
- How to Delete a Folder in Windows 10
- How to Open and Use Disk Cleanup in Windows 10
- How to Free Up Drive Space in Windows 10
- What is $SysReset folder and how to delete $SysReset folder in Windows 10
- How to Delete Windows10Upgrade Folder in Windows 10
- How to Remove Temporary Files in Windows 10
- How to Go Back to Previous Version of Windows in Windows 10
- How to Set Number of Days can Go Back to Previous Version of Windows in Windows 10
- What is $GetCurrent folder and how to delete $GetCurrent folder in Windows 10
- How to Analyze Component Store (WinSxS folder) in Windows 10
- How to Clean Up Component Store (WinSxS folder) in Windows 10
- How to Turn On or Off Storage Sense to Automatically Free Up Space in Windows 10
- How to Free Up Disk Space Now with Storage Sense in Windows 10