Remove Superseded and Unused System Files with DISM (Standard 8)

7/8/2014

Learn how to remove superseded and unused system files from your Windows Embedded 8 Standard (Standard 8) image by using Deployment Image Servicing and Management (DISM).

In Windows Embedded 8 Standard (Standard 8), you can choose to remove superseded or unused system files to help prevent the size of your image from increasing over time. Part of this increase can result from servicing files remaining on the system after installation, previous updates remaining on the system, and from unused system files. Deployment Image Servicing and Management (DISM) scavenges the contents of the Windows store. You can clean up your image by using the Disk Cleanup utility or by running the following DISM command:Dism /Online /Cleanup-Image /StartComponentCleanup

Prerequisites

  • You have access to either a device currently running Standard 8 or to a Windows image (.wim) file that contains the Standard 8 image that you want to update.
  • You have installed Windows Embedded 8 Standard Toolkit (Standard 8 Toolkit) on a development computer.

To remove superseded and unused system files from an offline image by using DISM

  1. Open a command prompt with administrator user rights on your development computer.

  2. Create a directory on your development computer and mount your image to that directory by typing the following:

    MD C:\MyDir\Mount
    DISM /Mount-Image /ImageFile:E:\images/myimage.wim /Index:1 /MountDir:C:\MyDir\Mount
    
  3. Run cleanup on your image by typing the following:

    DISM /Image:C:\MyDir\Mount /Cleanup-Image /StartComponentCleanup
    
  4. Unmount the image and commit your changes by typing the following:

    DISM /Unmount-Image /MountDir:C:\MyDir\Mount /Commit
    

To remove superseded and unused system files from an online image by using DISM

  1. Open a command prompt with administrator user rights on your device and type the following:

    Dism /Online /Cleanup-Image /StartComponentCleanup
    

See Also

Concepts

Maintain Images