Sunday, December 1, 2013

Using the DISM command to free up some disk space with Windows

Starting with Windows Vista/Server 2008, a subfolder named WinSxS is present under the system folder.  This folder contains all Windows system components, and can grow quite large over time.  One option to use to lower the amount of disk space being used is to execute the following command.  The command dism.exe /Online /Cleanup-Image /AnalyzeComponentStore should offer some information concerning the current size.  To clean up the store, use the command below. 

dism.exe /Online /Cleanup-Image /StartComponentCleanup

dism

The following command will remove files needed for the uninstallation of a service pack.

dism.exe /online /Cleanup-Image /SPSuperseded

The following command will remove all old versions of every component.

dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase

Another method is to remove local setup files for features that will never be used.  To obtain a list of local components, use the command below:

dism.exe /Online /English /Get-Features /Format:Table

To remove a feature from the local system, use the command below:

dism.exe /Online /Disable-Feature /featurename:NAME /Remove

Windows 8 and 8.1 include a built-in scheduled task named StartConponentCleanup that will clean up any components 30 days after the initial installation date.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.