---
title: "Using DISM cleanup-image for a Simple Windows 10 Repair"
description: "Learn how to repair your Windows 10 image without resetting your operating system with the DISM cleanup-image command!"
canonical: "https://adamtheautomator.com/dism-cleanup-image/"
---

# Using DISM cleanup-image for a Simple Windows 10 Repair

> Learn how to repair your Windows 10 image without resetting your operating system with the DISM cleanup-image command!

Source: https://adamtheautomator.com/dism-cleanup-image/

---

ATA Learning

Tap to hide

[

ATA Learning

](/)

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Search for:  

*   [](https://twitter.com/adbertram)
*   [](https://github.com/Adam-the-Automator)
*   [](https://www.linkedin.com/company/adam-the-automator-llc)
*   [](/feed/)

![Using DISM cleanup-image for a Simple Windows 10 Repair](https://adamtheautomator.com/wp-content/uploads/2022/03/How-to-Repair-a-Windows-10-Image-with-DISM-cleanup-image.jpg)

# Using DISM cleanup-image for a Simple Windows 10 Repair

[![](https://secure.gravatar.com/avatar/3a1e3d8e78fe4c161eeafd24aa121c895e8eea1c2fdc31ef9472e0c27226350f?s=192&d=mm&r=g)Leo Castillote](https://adamtheautomator.com/author/leo-castillote/)16 March 20227 min. read

Categories: [IT Ops](/category/it-ops/)

Tags:[DISM](/tag/dism/)[Windows](/tag/windows/)

Table of Contents

*   [Prerequisites](#prerequisites)
*   [Scanning for Corrupted Items with dism cleanup-image](#scanning-for-corrupted-items-with-dism-cleanup-image)
*   [Checking the Component Store for Existing Detected Corruptions](#checking-the-component-store-for-existing-detected-corruptions)
*   [Tidying Up the Component Store](#tidying-up-the-component-store)
*   [Repairing an Image Online](#repairing-an-image-online)
*   [Repairing an Image Offline with a Windows 10 Image Copy](#repairing-an-image-offline-with-a-windows-10-image-copy)
*   [Repairing an Image Offline](#repairing-an-image-offline)
*   [Repairing an Image Using /Cleanup-MountPoints](#repairing-an-image-using-cleanup-mountpoints)
*   [Conclusion](#conclusion)

If your Windows 10 has been misbehaving and becoming bothersome for quite a while now, your Windows 10 possibly got corrupted. Can you still fix it? It depends, but the DISM `cleanup-image` can help!

At the end of this tutorial, you’ll learn how to make your computer work like a charm by using a series of DISM `cleanup-image` commands. All this for free and for your peace of mind.

Read on and get your Windows 10 fixed without resorting to a reset!

## Prerequisites

This tutorial will be a hands-on demonstration. If you’d like to follow along, be sure you have the following:

*   A Windows 10 PC – This tutorial uses Windows 10 Version: 21H2, but other versions will also work.
*   A Windows user account with administrator privileges.

## Scanning for Corrupted Items with `dism cleanup-image`

Before running DISM commands, don’t waste time repairing your Windows 10 image just to hit a roadblock. Essentially, check if your image is still repairable with the DISM `cleanup-image` option and two arguments (`/ScanHealth` and `/CheckHealth`).

In this tutorial, you’ll first use the `/ScanHealth` argument, which tells DISM to check individual items for corruption in the [component store](https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/manage-the-component-store?view=windows-11#the-windows-component-store-and-winsxs-folder). The component store tracks and services all components that make up the Windows operating system.

[Launch your command prompt as an administrator](https://www.howtogeek.com/194041/how-to-open-the-command-prompt-as-administrator-in-windows-8.1/), and run the `DISM` command below to scan (`/ScanHealth`) your Windows image and log errors and/or corruptions when detected. The `/Online` switch in the command targets the running Windows 10 OS.

> _Remember to always run command prompt as administrator before running DISM commands since DISM requires elevated permissions._

```powershell
Dism /Online /Cleanup-Image /ScanHealth
```

Depending on the volume of your Windows 10 image, scanning corrupted components will take time to complete. When the scan completes, you’ll see a similar image to the one below if no component store corruption has been detected.

![Scanning the Windows 10 Image for Corrupted Files and Errors](https://adamtheautomator.com/wp-content/uploads/2022/03/image-198.png)

Scanning the Windows 10 Image for Corrupted Files and Errors

> _With `/CheckHealth`, DISM tells you whether the image is healthy, repairable, or non-repairable. According to Microsoft Support, if the image is non-repairable, “you should discard the image and start again“, implying reinstalling your Windows 10._

## Checking the Component Store for Existing Detected Corruptions

Like the `/ScanHealth` argument, the `/CheckHealth` argument lets you check if any corruption has been detected, but `/ScanHealth` only takes a few seconds to complete. Yes! Scanning takes less time because the `/CheckHealth` argument reports existing error logs readily available.

1\. Run the following command to check existing error logs for detected corruption in your system files.

```powershell
Dism /Online /Cleanup-Image /CheckHealth
```

Below is an example output after appending the /CheckHealth argument. As you can see, the message says No component store corrupted detected. This output raises your chances of getting your Windows 10 image repaired.

![Checking the Component Store for any Detected Corruption](https://adamtheautomator.com/wp-content/uploads/2022/03/image-199.png)

Checking the Component Store for any Detected Corruption

2\. If your image is repairable, run the `sfc /scannow` command below to check for, and repair corrupted or modified system files.

```bash
sfc /scannow
```

After running the command, you’ll see verification progress, like the one below.

> _Do not close the command prompt until the scan reaches 100 percent and the repair completes._

![Checking and Repairing Corrupt System Files with System File Checker (sfc)](https://adamtheautomator.com/wp-content/uploads/2022/03/image-200.png)

Checking and Repairing Corrupt System Files with System File Checker (sfc)

> _If you get an error after running sfc /scannow command,_ [check Microsoft’s documentation about using the System File Checker](https://support.microsoft.com/en-us/topic/use-the-system-file-checker-tool-to-repair-missing-or-corrupted-system-files-79aa86cb-ca52-166a-92a3-966e85d4094e)_._

3\. Finally, when you’ve successfully repaired your Windows 10 system files, restart your device to test if the repair fixed your Windows 10 issues.

## Tidying Up the Component Store

Knowing that your Windows 10 image is repairable, take this opportunity to free up some disk space by reducing the size of the component store. Insufficient storage is known to cause issues, not just with [Windows 10](https://adamtheautomator.com/disk-cleanup-cmd/) but also other OS.

Related:[9 Ways to Clean Up Windows 10 With Disk Cleanup Cmd’s](https://adamtheautomator.com/disk-cleanup-cmd/)

But before cleaning up the component store, you’ll first have to use the `/AnalyzeComponentStore` argument together with a DISM command.

1\. Run the following command to tell DISM to analyze the component store (`/AnalyzeComponentStore`). This command will show you the size of the component store, so you can see if there are reclaimable packages and if cleanup is recommended.

```powershell
Dism /Online /Cleanup-Image /AnalyzeComponentStore
```

In the analysis report as below, you can see the following information:

*   **Windows Explorer Reported Size of Component Store : 7.76 GB.**
    
*   **Date of the Last Cleanup : 2022-03-01 12:15:00.**
    
*   **Number of Reclaimable Packages : 1.**
    
*   **Component Store Cleanup Recommended : Yes.**
    

![Analyzing the Component Store Before Reducing its Size](https://adamtheautomator.com/wp-content/uploads/2022/03/image-201.png)

Analyzing the Component Store Before Reducing its Size

2\. Next, run the below command to free up disk space (`/StartComponentCleanup`). The command eradicates outdated items in the component store or the earlier versions of updated components.

```powershell
Dism /Online /Cleanup-Image /StartComponentCleanup
```

You can see below that the operation was completed successfully.

![Cleaning up the Component Store to Get Rid of Outdated Components ](https://adamtheautomator.com/wp-content/uploads/2022/03/image-202.png)

Cleaning up the Component Store to Get Rid of Outdated Components

3\. Now, execute the below command to make the component store size even smaller with the `/ResetBase` argument.

> _Note that you can’t uninstall Windows updates installed since the /ResetBase argument tells DISM to reset the base of the superseded components._

```powershell
Dism /Online /Cleanup-Image /StartComponentCleanup /ResetBase
```

Related:[How to Fix All of Those “Feature update to Windows 10” Errors](https://adamtheautomator.com/feature-update-to-windows-10/)

Additionally, you can run the following command, appending /Defer, to delay long-running cleanup operations to the next automatic maintenance.

```powershell
Dism /Online /Cleanup-Image /StartComponentCleanup /ResetBase /Defer
```

4\. Lastly, rerun the command below as you did in step one to see the changes after cleaning up the component store.

```powershell
Dism /Online /Cleanup-Image /AnalyzeComponentStore
```

The result below shows the new component store size is now 7.00 GB from 7.67 GB before cleaning up.

> _The /ResetBase argument was not used in this cleanup._

![Re-analyzing the Component Store to see Changes in Size](https://adamtheautomator.com/wp-content/uploads/2022/03/image-203.png)

Re-analyzing the Component Store to see Changes in Size

## Repairing an Image Online

If you’re still unsatisfied with how your Windows 10 performs after cleaning up the component store, then it’s time to jump into repairing your Windows 10 image.

There are two ways to repair an image using the online method, using `/Online` switch and `/Online` switch with `/Source` argument. But you’ll start with the `/Online` switch for this tutorial as it does not require a lot of effort.

Run the command below to repair (`/RestoreHealth`) your Windows 10 image (`/Cleanup-Image`). The `/Online` switch below targets the current working Windows 10 OS to repair, while `/RestoreHealth` restores your image tip-top shape.

This command uses Windows Update to get the required files to fix corruptions on your Windows 10 image.

```bash
Dism /Online /Cleanup-Image /RestoreHealth
```

Now, restart your device after successfully repairing your Windows 10 image, and see if there are changes in how your Windows 10 performs.

![Repairing the Windows 10 image Online using Features on Demand as the Source](https://adamtheautomator.com/wp-content/uploads/2022/03/image-204.png)

Repairing the Windows 10 image Online using Features on Demand as the Source

## Repairing an Image Offline with a Windows 10 Image Copy

If, for any reason that repairing your Windows 10 image online fails, you can repair your image offline with a fresh copy of a Windows 10 image. How? You’ll use the Windows Media Creation Tool to download an ISO file of a Windows 10 image.

1\. [Download and use the Windows Media Creation Tool](https://lazyexchangeadmin.cyou/windows-media-creation-tool/) to get a fresh copy of the Windows 10 image in an ISO file[.](https://lazyexchangeadmin.cyou/windows-media-creation-tool/)

2\. Next, open File Explorer, and locate your ISO file. Right click on the ISO file, and select **Mount**, as shown below, to mount your ISO file.

> _There’s no need to burn the ISO file into a blank DVD because Windows 10 can virtually mount ISO files._

![Mounting the ISO File to a Virtual Drive](https://adamtheautomator.com/wp-content/uploads/2022/03/image-205.png)

Mounting the ISO File to a Virtual Drive

3\. After you mount the image, take note of the mounted drive letter, and check the **sources** folder of your image to confirm if you have either **install.wim** or **install.esd**. You’ll need this information for the next step.

![Checking the Virtual Drive Letter of the Mounted Image](https://adamtheautomator.com/wp-content/uploads/2022/03/image-206.png)

Checking the Virtual Drive Letter of the Mounted Image

4\. Run the following command to repair your image with a Windows 10 image source (`/Source`). The `/LimitAccess` parameter prevents DISM from using Windows Update as a repair source. Replace the following value in the command accordingly:

*   `G:` – with the actual drive letter you noted in step three.
    
*   `win_image` – with either _install.wim_ or _install.esd_ that you noted in step three.
    

```powershell
Dism /Online /Cleanup-Image /RestoreHealth /Source:G:\sources\win_image /LimitAccess
```

![Repairing the Image Online with a Fresh Copy of Windows 10 Image as the Source](https://adamtheautomator.com/wp-content/uploads/2022/03/image-207.png)

Repairing the Image Online with a Fresh Copy of Windows 10 Image as the Source

5\. Finally, restart your device after the successful repair, and your Windows 10 should now be fully functional.

## Repairing an Image Offline

Perhaps a client tasked you to repair an offline Windows 10 image. If so, appending the `/Image switch` can help, where you’ll specify the path to the root directory of the offline image copy.

1\. Mount your ISO and confirm the drive letter as you did in the “Repairing an Image with a Windows 10 Image Copy” section (steps two-three).

> _You can skip this step if you have an image only instead of an ISO._

2\. Next, check whether you have the _install.esd_ or _install.wim_ file. If you have the _install.esd_ file, [convert the file to install.wim](https://www.intel.com/content/www/us/en/support/articles/000023992/memory-and-storage/intel-optane-memory.html), so you can mount the image on a folder (step four).

> _If you have the install.wim file already, you can jump to step five to repair your Windows 10 image._

For this tutorial, the converted _install.wim_ file is saved on the _C:\\_ drive directly, but you can save it on your preferred location.

> _Converting the image from .esd to .wim is required since /Mount-Wim option only mounts .wim files._

3\. Create a folder with your preferred name where you’ll mount the offline image (_install.wim_). But for this tutorial, the folder is named _C:\\Offline_.

4\. Now, run the below command to mount the image (`install.wim`) to your dedicated folder (`C:\Offline`). Replace `C:\install.wim` with your image’s file path and `C:\Offline` with your dedicated offline image’s root folder.

```bash
DISM /Mount-Wim /WimFile:"C:\install.wim" /index:1 /MountDir:"C:\Offline"
```

![Mounting the Offline Image](https://adamtheautomator.com/wp-content/uploads/2022/03/image-208.png)

Mounting the Offline Image

5\. Finally, run the following command to repair your Windows 10 image offline (`/Image`) using your mounted Windows 10 image as the source (`/Source`).

Change the paths in the command below accordingly:

*   `G:\sources\install.esd` – your mounted Windows 10 image path.
    
*   `C:\Offline` – the root directory of your offline Windows 10 image.
    

```powershell
Dism /Image:C:\Offline /Cleanup-Image /RestoreHealth /Source:G:\Sources\install.esd
```

![Repairing the Offline Image](https://adamtheautomator.com/wp-content/uploads/2022/03/image-209.png)

Repairing the Offline Image

## Repairing an Image Using `/Cleanup-MountPoints`

You’ve seen how DISM commands can fix your image online and offline. But on some occasions, an image can be corrupted while altering it with DISM. How do you fix it? You’ll clean up the mount points of your image with the [`/Cleanup-Mountpoints`](https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/dism-image-management-command-line-options-s14?view=windows-11#cleanup-mountpoints) option.

Run the below command to clean up your image’s mount points. This command does not unmount any mounted image but removes resources associated with a corrupted image.

```powershell
Dism /Cleanup-Mountpoints
```

![Removing Resources Associated with a Corrupted Image](https://adamtheautomator.com/wp-content/uploads/2022/03/image-210.png)

Removing Resources Associated with a Corrupted Image

Now, restart your device after the cleanup and see if your Windows 10 image is working fine.

## Conclusion

In this article, you have learned to scan, check, and restore your Windows 10 image using DISM `cleanup-image`. Cleanup-Image is an excellent tool for getting your computer back on track and is just one of the commands you can run with DISM.

Learning how to repair your computer is one thing and applying that knowledge is another. Now that you know how to do it yourself, it’s up to you to take action.

Share this article

[Share on X](https://twitter.com/intent/tweet?url=https%3A%2F%2Fadamtheautomator.com%2Fdism-cleanup-image%2F&text=Using%20DISM%20cleanup-image%20for%20a%20Simple%20Windows%2010%20Repair)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fadamtheautomator.com%2Fdism-cleanup-image%2F)[Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fadamtheautomator.com%2Fdism-cleanup-image%2F)

## Related Posts

![](https://adamtheautomator.com/wp-content/uploads/2024/04/idfix.jpg)

### [Solve Azure AD Connect Errors via the Microsoft IdFix Tool](/idfix/)

Fix Azure AD Connect errors fast with the Microsoft IdFix tool—your go-to solution for seamless synchronization and efficient directory management!

![](https://adamtheautomator.com/wp-content/uploads/2024/04/sandboxie.jpg)

### [How to Install Sandboxie on Windows](/sandboxie/)

Secure your Windows system with Sandboxie. Learn how to install this tool hassle-free and safeguard your digital activities!

![](https://adamtheautomator.com/wp-content/uploads/2022/11/How-to-Install-NitroShare-for-Cross-Platform-File-Transfer.jpg)

### [Install NitroShare and Streamline Your File Transfers Today](/nitroshare/)

Simplify cross-platform file transfers with NitroShare. This tutorial guides you through installation and use for fast, effortless file sharing between different operating systems.

## Categories

*   [IT Ops](/category/it-ops/)
*   [Cloud](/category/cloud/)
*   [DevOps](/category/devops/)
*   [Home Ops](/category/home-ops/)
*   [Information Security](/category/infosec/)
*   [Software Development](/category/software-development/)

## Site

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Copyright 2026© ATA Learning | [Privacy Policy](/privacy/)
