Windows 8.1 gives allows you to forcibly remove all previous versions of uninstalled components, even ones that haven’t been around for more than 30 days. These commands must be run in an elevated Command Prompt — in other words, start the Command Prompt window as Administrator.
For example, the following command will uninstall all previous versions of components without the scheduled task’s 30-day grace period:
DISM.exe /online /Cleanup-Image /StartComponentCleanup
The following command will remove files needed for uninstallation of service packs. You won’t be able to uninstall any currently installed service packs after running this command:
DISM.exe /online /Cleanup-Image /SPSuperseded
The following command will remove all old versions of every component. You won’t be able to uninstall any currently installed service packs or updates after this completes:
DISM.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase