How to Delete Windows.old and $Windows.~BT folders in Windows 10  

Page 1 of 25 12311 ... LastLast
    How to Delete Windows.old and $Windows.~BT folders in Windows 10

    How to Delete Windows.old and $Windows.~BT folders in Windows 10

    Published by Category: Performance & Maintenance
    26 Dec 2021
    Designer Media Ltd


    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:

    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



    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
    How to Delete Windows.old and $Windows.~BT folders in Windows 10-windows.old_folder.jpg






    OPTION ONE

    Delete "Windows.old" and "$Windows.~BT" Folders in Disk Cleanup


    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)

    How to Delete Windows.old and $Windows.~BT folders in Windows 10-1-disk_cleanup_windows.old.jpg

    3 Click/tap on the Clean up system files button. (see screenshot below)

    How to Delete Windows.old and $Windows.~BT folders in Windows 10-2-disk_cleanup_windows.old.jpg

    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)

    How to Delete Windows.old and $Windows.~BT folders in Windows 10-3-disk_cleanup_windows.old.jpg

    7 Click/tap on Delete Files to confirm. (see screenshot below)

    8 When Disk Cleanup finishes, the C:\Windows.old folder will be deleted.

    How to Delete Windows.old and $Windows.~BT folders in Windows 10-5-disk_cleanup_windows.old.jpg






    OPTION TWO

    Delete "Windows.old" and "$Windows.~BT" folders in Elevated Command Prompt


    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.

    How to Delete Windows.old and $Windows.~BT folders in Windows 10-delete_windows.old_folder_command.jpg






    OPTION THREE

    Delete "Windows.old" Folder in a Command Prompt at Boot


    1 Boot to a command prompt at boot.

    2 To Verify the Windows 10 Drive Letter 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) Type diskpart into the command prompt, and press Enter. (see screenshot below)

    B) Type list 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, type exit, and press Enter.

    How to Delete Windows.old and $Windows.~BT folders in Windows 10-1-cmd_boot_windows.old.jpg


    3 To Delete the "Windows.old" Folder

    A) Type the command below into the command prompt, and press Enter. (see screenshot below)

    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.

    B) Close How to Delete Windows.old and $Windows.~BT folders in Windows 10-close.jpg the command prompt.

    How to Delete Windows.old and $Windows.~BT folders in Windows 10-2-cmd_boot_windows.old.jpg

    4 Click/tap on the Continue button to restart the computer and continue to Windows 10. (see screenshot below)

    How to Delete Windows.old and $Windows.~BT folders in Windows 10-delete_folder_command_prompt_at_boot-3.jpg






    OPTION FOUR

    Delete "Windows.old" and "$Windows.~BT" Folders in Storage Settings


    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.

    How to Delete Windows.old and $Windows.~BT folders in Windows 10-remove_temporary_files_in_settings-1.jpg

    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)

    How to Delete Windows.old and $Windows.~BT folders in Windows 10-remove_temporary_files_in_settings-2.png

    4 When finished, you can close Settings if you like.






    OPTION FIVE

    Delete "Windows.old" and "$Windows.~BT" Folders in Storage Sense Settings


    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)

    How to Delete Windows.old and $Windows.~BT folders in Windows 10-storage_sense-1.jpg

    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)

    How to Delete Windows.old and $Windows.~BT folders in Windows 10-storage_sense-2.png How to Delete Windows.old and $Windows.~BT folders in Windows 10-storage_sense-3.jpg

    4 When finished, you can close Settings if you like.





    OPTION SIX

    Delete "Windows.old" , "$Windows.~BT", or "$Windows.~WS" Folders using BAT file


    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)

    How to Delete Windows.old and $Windows.~BT folders in Windows 10-delete_system_folders.jpg


    That's it,
    Shawn Brink



  1. ThrashZone's Avatar
    Posts : 7,681
    3-Win-7Prox64 3-Win10Prox64 3-LinuxMint20.2
       #1

    Another good one Shawn :)
    I just noticed there's a Windows defender listing on the list 3.77mg :/
    But yea Previous windows installation files 8.34gb
    That was using disk cleanup options,
    Cheers.
      My Computers

  2. John Pombrio's Avatar
    Posts : 429
    Windows 10 Fast Ring
       #2

    This tutorial did not originally work when I tried it on the windows.old folder that was generated by the Win 10 9860 update. My fault was not bothering to scroll down and checking the box to delete the "previous windows install" box. I need to learn to read more and click less.
      My Computer

  3. Brink's Avatar
    Posts : 60,444
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #3

    No worries John. We all do it from time to time. :)
      My Computers

  4. Layback Bear's Avatar
    Posts : 983
    Windows 7/64 Professional
       #4

    I put Cleanmgr on my desktop in the first version. I use it daily as I also do in W-7.

    I have found that a reboot after using Cleanmgr it does help at time. It all seem to depend on what is being removed.
      My Computers


  5. Posts : 12
    windows 7, 8, 10, various linux flavors (in VirtualBox)
       #5

    deleting windows.old not working


    None of these options work on my system. Running VirtualBox with build 10049, installed on top of fresh 10041 (took over a day since I didn't allocate enough CPUs and RAM to the VM and every language on Earth was installed), and windows.old just seems bulletproof.

    The "Previous Windows Installation(s) checkbox isn't present.

    Tried removing "read only" attribute (everything is protected), tried del windows.old at cmd prompt w/admin rights, diskpart shows nothing...

    Sure would be nice to get that 5+ GB back!
    Last edited by extreme; 08 Apr 2015 at 03:37. Reason: adding detail
      My Computer

  6. f14tomcat's Avatar
    Posts : 55,559
    Multi-boot Windows 10/11 - RTM, RP, Beta, and Insider
       #6

    extreme said:
    None of these options work on my system. Running VirtualBox with build 10049, installed on top of fresh 10041 (took over a day since I didn't allocate enough CPUs and RAM to the VM and every language on Earth was installed), and windows.old just seems bulletproof.

    The "Previous Windows Installation(s) checkbox isn't present.

    Tried removing "read only" attribute (everything is protected), tried del windows.old at cmd prompt w/admin rights, diskpart shows nothing...

    Sure would be nice to get that 5+ GB back!
    Did you do this step? It should work.
      My Computers


  7. Posts : 12
    windows 7, 8, 10, various linux flavors (in VirtualBox)
       #7

    f14tomcat said:
    Did you do this step? It should work.
    Several times. That checkbox doesn't appear...
      My Computer

  8. Charlie's Avatar
    Posts : 719
    win 7 dual boot / 10
       #8

    How to Delete Windows.old and $Windows.~BT folders in Windows 10-ccleaner-gets-old.jpgI
    saw somewhere that the program called ccleaner by pinfore would clean up old windows system files
    Last edited by Charlie; 08 Apr 2015 at 16:38.
      My Computer

  9. f14tomcat's Avatar
    Posts : 55,559
    Multi-boot Windows 10/11 - RTM, RP, Beta, and Insider
       #9

    extreme said:
    Several times. That checkbox doesn't appear...
    Can you post, please, the exact way you are running cleanmgr?
      My Computers


 

Tutorial Categories

How to Delete Windows.old and $Windows.~BT folders in Windows 10 Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 16:43.
Find Us




Windows 10 Forums