How to extend time to uninstall a Windows 10 upgrade

Windows 10 removes the ability to uninstall an upgrade after ten days by default, but you can use these steps to retain the previous installation files longer to delay the uninstall period.

Windows 10 Settings and Command Prompt with DISM command to expend uninstall window
Windows 10 Settings and Command Prompt with DISM command to expend uninstall window

On Windows 10, a copy of the previous installation (known as the Windows.old folder) is created during the upgrade process to a new version, in case that the installation fails and rollback is required, or things are not working as expected and you need to go back to the previous version.

The only problem with this mechanism is that if the installation completed successfully the system deletes the previous version files automatically after ten days to free up space. This means that if you have problems after the Windows.old folder was deleted, you’ll no longer have the “Go back to the previous version of Windows 10” option in the Recovery settings page.

Starting with the Windows 10 version 1803 (April 2018 Update), Microsoft is adding new commands options to its Deployment Image Servicing and Management (DISM) tool to extend the time which allows you to uninstall an upgrade after it’s installed.

In this guide, you’ll learn the steps to use DISM commands to set the number of days after an upgrade that you can uninstall the upgrade before the system deletes the previous version.

How to change number of days to uninstall Windows 10 upgrade

In order to stop Windows 10 from deleting previous installation files and removing the uninstall option after the ten days you installed a new version, use these steps:

Important: You must do these steps before the system deletes the previous installation. If you no longer have the option to rollback, you can bookmark this page, and as soon as the next upgrade installs, you will then be able to use these instructions.
  1. Open Start.

  2. Search for Command Prompt, right-click the top result, and select Run as administrator.

  3. Type the following command to see the current time window to uninstall an upgrade of Windows 10 and press Enter:

    DISM /Online /Get-OSUninstallWindow

    DISM Get-OSUninstallWindow
    DISM Get-OSUninstallWindow
  4. Type the following command to set the number of days before the previous installation is deleted and press Enter:

    DISM /Online /Set-OSUninstallWindow /Value:60
    DISM Set-OSUninstallWindow
    DISM Set-OSUninstallWindow
    Quick Tip: The above command changes the default value from the default 10 to 60 days. You can change 60 for any number of days you want to retain the previous version, but bear in mind that 60 is the maximum number, any value over 60 will not work, and it’ll set the option to 10 days.

Once you’ve completed the steps, in the future, you’ll be able to rollback to a previous version of Windows 10 using the recovery options within the number of days you specified. Just remember that you have to do this every time, immediately, after an upgrade.

About the author

Mauro Huculak is a Windows How-To Expert who started Pureinfotech in 2010 as an independent online publication. He has also been a Windows Central contributor for nearly a decade. Mauro has over 15 years of experience writing comprehensive guides and creating professional videos about Windows and software, including Android and Linux. Before becoming a technology writer, he was an IT administrator for seven years. In total, Mauro has over 21 years of combined experience in technology. Throughout his career, he achieved different professional certifications from Microsoft (MSCA), Cisco (CCNP), VMware (VCP), and CompTIA (A+ and Network+), and he has been recognized as a Microsoft MVP for many years. You can follow him on X (Twitter), YouTube, LinkedIn and About.me. Email him at [email protected].