How to Set Number of Days can Go Back to Previous Version of Windows in Windows 10
When you upgrade to Windows 10 or update to a new version or build of Windows 10 (ex: Windows Update), a copy of the previous installation is saved to the Windows.old folder in the root directory of the Windows 10 drive as a backup. This backup will allow you to be able to go back to the previous version of Windows for up to a 10 days after upgrading to Windows 10 if you should want or need to.
Starting with the Windows 10 April 2018 Update v1803, new DISM commands have been added to:
- Find out how many days after an upgrade that an OS can be uninstalled (go back to the previous version)
- Initiate an uninstall (go back to the previous version)
- Remove the ability for a user to uninstall a Windows upgrade (go back to the previous version)
- Set the number of days that a user has to uninstall a Windows upgrade (go back to the previous version)
See also: DISM operating system uninstall command-line options | Microsoft Docs
This tutorial will show you how to see and set the number of days after an upgrade you are still able to go back to a previous version of Windows in Windows 10.
You must be signed in as an administrator to set the number of days.
Note that these DISM commands are only available while you can still go back to a previous version of Windows.
If either of the following are true, then DISM will report Error 1168, Element not found. This error message indicates that the previous version has been deleted, and there's currently not a previous version to go back to.
1) Windows has removed the previous version automatically after 10 days.
2) The previous version has been removed using Disk Cleanup.
Contents
- Option One: See Current Number of Days after an Upgrade You Can Go back to Previous Version of Windows
- Option Two: Set Number of Days after an Upgrade You Can Go back to Previous Version of Windows
- Option Three: Remove Ability to Go back to Previous Version of Windows
EXAMPLE: "Go back to the previous version of Windows 10" after set number of days have expired
1 Open an elevated command prompt.
2 Copy and paste the command below into the elevated command prompt, and press Enter. (see screenshot below)
DISM /Online /Get-OSUninstallWindow
3 You will now see the number of days (ex: "10") currently set after an upgrade to be able to go back to a previous version of Windows. You can now close the elevated command prompt if you like.
1 Open an elevated command prompt.
2 Type the command below into the elevated command prompt, and press Enter. (see screenshot below)
DISM /Online /Set-OSUninstallWindow /Value:<days>
Substitute <days> in the command above with the actual number (2 to 60) of days you want. The default is 10 days.
For example:DISM /Online /Set-OSUninstallWindow /Value:30
3 You can now close the elevated command prompt if you like.
This option will remove the ability to go back to the previous version of Windows on your PC.
You will be able to go back to a previous version of Windows again after the next time you update Windows 10 to a new version or build via Windows Update.
This will not delete the Windows.old folder or its content.
1 Open an elevated command prompt.
2 Copy and paste the command below into the elevated command prompt, and press Enter. (see screenshot below)
DISM /Online /Remove-OSUninstall
3 You will now no longer be able to go back to the previous version of Windows on this PC. You can now close the elevated command prompt if you like.
That's it,
Shawn
Related Tutorials
- How to Go Back to Previous Version of Windows in Windows 10
- What is Windows.old folder and how to delete Windows.old folder in Windows 10