How to Stop Windows 11 from Automatically Deleting the Windows.old Folder

The Ticking Clock on Recovery

When you upgrade Windows 11 to a major new feature version, or if you upgrade from Windows 10 to Windows 11, the operating system creates a massive folder on your C: drive called Windows.old. This folder contains a complete backup of your previous operating system installation, including your user profile, old program files, and system settings. It exists solely to allow you to “rollback” or undo the upgrade if the new version causes driver crashes or software incompatibilities. However, this folder takes up tens of gigabytes of space. To save your hard drive from filling up, Windows 11 is programmed to automatically delete the Windows.old folder exactly 10 days after the upgrade. If you realize on day 12 that your critical audio software doesn’t work on the new update, you are completely out of luck—the rollback option is gone.

How to Extend the Deletion Timer via Command Prompt

While you cannot permanently stop Windows from deleting the folder using standard settings, you can drastically extend the countdown timer from 10 days to 60 days, giving you two full months to thoroughly test the new operating system before the backup is destroyed.

1. Click the Start button and type cmd.

2. In the search results, right-click on Command Prompt and select Run as administrator.

3. If the User Account Control (UAC) prompt appears, click Yes.

4. In the black Command Prompt window, type or paste the following command exactly as written:

DISM /Online /Set-OSUninstallWindow /Value:60

5. Press Enter.

The system will process the command and should return a message saying “The operation completed successfully.” Windows 11 will now wait a full 60 days before triggering the automatic cleanup task to delete the Windows.old folder.

How to Rename the Folder for Permanent Preservation

If you want to keep the backup forever (for example, to manually extract old save games or application config files months down the line), you must hide the folder from the Windows cleanup task by changing its name.

1. Open File Explorer and navigate to This PC > Local Disk (C:).

2. You will see the Windows.old folder.

3. Right-click the folder and select Rename.

4. Change the name to something else, such as Windows.backup or Windows.old.safe.

5. Press Enter. You will need to provide Administrator permission to complete the rename.

Because the folder is no longer named exactly “Windows.old”, the automated cleanup script will ignore it. Note that renaming the folder will break the built-in “Go back to the previous version of Windows” button in Settings, as that tool relies on the exact folder name. If you ever want to perform an automated rollback, you must rename the folder back to Windows.old before initiating the process.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.