Can you suppress the creation of the Windows.old folder when Feature Updating a windows 10 22H2 device (via Intune) to Win 11 24H2 device

Spencer Ian 20 Reputation points
2025-03-04T16:01:36.2633333+00:00

Can you suppress the creation of the Windows.old folder that gets created when you Feature Update a device through Intune from Win 10 22h2 to Win 11 24H2 and if you can. How would you do that? Many thanks Ian

Microsoft Intune Updates
Microsoft Intune Updates
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Updates: Broadly released fixes addressing specific issue(s) or related bug(s). Updates may also include new or modified features (i.e. changing default behavior).
126 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Michael Taylor 57,216 Reputation points
    2025-03-04T16:10:12.4366667+00:00

    The Windows.Old folder is auto-created by the Windows Update in order to allow for rollback if update fails or if the user wants to rollback later. It is a snapshot of the previously working version of Windows. AFAIK you cannot prevent this. If you could and the update failed then there would be no way to recover back to the previously working system.

    I think the better option is to remove the directory after the update, and ideally after you've verified the update is good. From my understanding the folder should be automatically cleaned up approximately 10 days after the update as that should be enough time to confirm it is working correctly.

    If you wanted to remove it earlier then ultimately you should run the Disk Cleanup tool as that has the option to remove the previous version. In theory you could just delete the directory I guess but I've never tried that and it is a system directory anyway so you might run into issues. The following article discusses how to programmatically call the Disk Cleanup tool from the CLI. You can run this command to clean up the previous Windows version.

    0 comments No comments

  2. Crystal-MSFT 52,741 Reputation points Microsoft External Staff
    2025-03-05T01:36:53.26+00:00

    @Spencer Ian, Agree with Michael, the Windows.old folder is automatically created during a major Windows upgrade to allow rollback to the previous version. Unfortunately, there is no built-in way to suppress the creation of this folder during the upgrade process, as it is a safeguard feature of Windows.

    Just as Michael mentioned, the Windows.old folder is automatically deleted after 10 days by default. If you want to clean it directly, here are two links with the commands to do this. You can read them as a reference.

    https://www.itechtics.com/delete-windowsold-folder/#:~:text=To%20delete%20the%20Windows.old%20folder%20in%20Windows%2011%2C,will%20remove%20the%20Windows.old%20folder%20without%20any%20issues.

    https://qtechbabble.wordpress.com/2016/11/16/use-a-batch-script-to-remotely-delete-windows-old-folder/

    Note: None-Microsoft link, just for the reference.

    Hope the above information can help.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.