Remove Apps, Features & Editions from a WIM Image
In this article
You remove built-in apps, Windows features and unwanted editions from a WIM image by mounting the image with DISM, deleting the packages and editions you do not want, then committing the changes back to the file. The typical workflow is: copy install.wim somewhere safe, run DISM /Mount-Image against the index you plan to deploy, remove provisioned app packages and optional features with /Remove-ProvisionedAppxPackage and /Disable-Feature, delete extra edition indexes with /Delete-Image, then /Unmount-Image /Commit. Everything below uses only Microsoft's own DISM tool, which ships with Windows and the Windows ADK. Menu and command wording can differ slightly between Windows versions, so match the syntax to the DISM build on your machine by running dism /? first.
What You'll Need
- A Windows PC with administrator rights. DISM image servicing requires an elevated Command Prompt or PowerShell window.
- The Windows installation media (ISO) or a mounted image containing
sources\install.wim. If your media usesinstall.esd, convert it to WIM first withDISM /Export-Image. - Enough free disk space: roughly the size of the image plus a few gigabytes of working room. A mounted image expands considerably.
- A backup copy of the original WIM. Every step here modifies the file, and a corrupted image means re-downloading media.
- Optionally, the Windows ADK if you are servicing images on a machine that is not the target Windows version.
Step-by-Step
- Copy the image to a working folder. Create a folder such as
C:\WIMWorkand copyinstall.wimfrom the media'ssourcesfolder into it. Work on the copy, never the original media. - List the editions inside the image. Open Command Prompt as administrator and run
DISM /Get-WimInfo /WimFile:C:\WIMWork\install.wim. Note the index numbers and names (Home, Pro, Enterprise and so on). You will need these numbers for the next steps. - Mount the edition you want to keep. Create an empty folder, for example
C:\WIMWork\mount, then runDISM /Mount-Image /ImageFile:C:\WIMWork\install.wim /Index:1 /MountDir:C:\WIMWork\mount. Replace the index with the edition you actually plan to deploy. If the image is already mounted from a previous session, runDISM /Cleanup-Wimfirst. - List provisioned app packages. Run
DISM /Image:C:\WIMWork\mount /Get-ProvisionedAppxPackages. This prints the package names for the built-in apps that get installed for new users. Copy the exact package name strings; you cannot use friendly names like "Xbox" here. - Remove the apps you do not want. For each package, run
DISM /Image:C:\WIMWork\mount /Remove-ProvisionedAppxPackage /PackageName:<exact package name>. Do them one at a time so a failure on one package does not hide the rest. Some packages are dependencies for others, so remove dependents before their dependencies if DISM reports an error. - List optional features. Run
DISM /Image:C:\WIMWork\mount /Get-Features /Format:Table. This shows features and whether they are enabled, disabled or removed. Note the exact feature names. - Disable the features you do not need. Run
DISM /Image:C:\WIMWork\mount /Disable-Feature /FeatureName:<feature name> /Remove. The/Removeswitch takes the payload out of the image entirely rather than just turning it off. Omit it if you only want the feature disabled but still installable later. - Delete unwanted editions. Unmount first if you are deleting the index you mounted. Then run
DISM /Delete-Image /ImageFile:C:\WIMWork\install.wim /Index:<number>for each edition you do not want. Delete from the highest index number downward, because removing an index renumbers the ones after it. Never delete the last remaining index. - Verify before committing. Re-run the Get commands against the mounted image to confirm the apps and features are gone. It is much easier to fix a mistake now than after the image is deployed.
- Unmount and commit. Run
DISM /Unmount-Image /MountDir:C:\WIMWork\mount /Commit. If you want to throw the changes away, use/Discardinstead. If the unmount fails because a file is in use, close Explorer windows pointing at the mount folder and retry. - Confirm the final image. Run
DISM /Get-WimInfo /WimFile:C:\WIMWork\install.wimagain to check the edition list, then copy the finished WIM back into the media'ssourcesfolder, replacing the original.
Common Mistakes
- Editing the WIM on read-only media or on a USB stick that drops out mid-write. Always work from a local folder.
- Using app display names instead of exact package names with
/Remove-ProvisionedAppxPackage. DISM will reject them. - Deleting image indexes from the bottom up, which shifts the numbers and removes the wrong edition. Go from highest to lowest.
- Forgetting
/Commiton unmount, which silently discards every change. - Removing features that other components depend on, then finding the deployment fails. Remove conservatively and test in a virtual machine first.
- Leaving a stale mount behind.
DISM /Cleanup-Wimclears orphaned mount records.
Tips
- Keep a text file of the exact package and feature names you removed, so you can reverse a decision later.
- Test the modified image in a virtual machine before deploying it to real hardware.
- Removing provisioned packages affects new user profiles; existing profiles on an already-installed system are a separate matter.
- If you only need to trim one edition, mount only that index rather than servicing every index in the file.
- Run
DISM /Image:... /Get-Featuresafter each removal batch to catch dependency warnings early.
Troubleshooting
If /Mount-Image fails with an access or file-in-use error, close any Explorer window open inside the mount directory, run DISM /Cleanup-Wim, and retry from an elevated prompt. If DISM reports the image is corrupted, restore your backup copy and start again rather than trying to patch it.
If an app package refuses to remove, check whether another package depends on it; remove the dependent package first. If a feature will not disable, confirm the exact feature name from /Get-Features rather than guessing, and check that the feature is not marked as a required parent for another enabled feature.
If the unmount fails, do not force-delete the mount folder. Reboot, run DISM /Cleanup-Wim, and unmount again with /Commit. If the WIM no longer lists the editions you expect, you likely deleted the wrong index; restore from backup. If deployment fails after your edits, the safest path is to redo the process from a fresh copy of the original media, removing fewer items each pass until the image deploys cleanly.
Frequently Asked Questions
Does removing provisioned apps from a WIM stop them coming back?
It stops them being provisioned for new user profiles from that image. Some components can be reinstalled by Windows updates or Store activity after deployment, so treat it as a clean starting point rather than a permanent block.
Can I remove an edition without mounting the image?
Yes. /Delete-Image works directly on the WIM file, but the index you want to delete must not be mounted at the time.
What is the difference between disabling and removing a feature?
Disabling turns the feature off but keeps its files so it can be re-enabled. Adding /Remove deletes the payload from the image, and re-enabling later requires source files.
Will this break Windows Update?
Removing core servicing features can interfere with updates. Stick to optional features and app packages you are confident are not required, and test before deploying.
Can I edit install.esd the same way?
Not directly. Export it to a WIM with DISM /Export-Image first, service the WIM, then use it in place of the ESD in your media.
Is a backup really necessary?
Yes. A failed unmount or a wrong index deletion can leave the image unusable, and the only reliable fix is starting from a clean copy.