Fix: Dism /online /cleanup-image /restorehealth Is Stuck

Switch to another file repair command such as SFC

by Claire Moraa
Claire Moraa
Claire Moraa
Author
Claire likes to think she's got a knack for solving problems and improving the quality of life for those around her. Driven by the forces of rationality, curiosity,... read more
Reviewed by Alex Serban
Alex Serban
Alex Serban
Windows Server & Networking Expert
After moving away from the corporate work-style, Alex has found rewards in a lifestyle of constant analysis, team coordination and pestering his colleagues. Holding an MCSA Windows Server... read more
Affiliate Disclosure
  • If DISM is stuck or taking a long time to complete its operation, you're probably not running it from an elevated command.
  • You may also have run out of memory so check whether you have enough RAM and try running the command again.

XINSTALL BY CLICKING THE DOWNLOAD FILE
To fix various PC problems, we recommend Restoro PC Repair Tool:
This software will repair common computer errors, protect you from file loss, malware, hardware failure and optimize your PC for maximum performance. Fix PC issues and remove viruses now in 3 easy steps:

  1. Download Restoro PC Repair Tool that comes with Patented Technologies (patent available here).
  2. Click Start Scan to find Windows issues that could be causing PC problems.
  3. Click Repair All to fix issues affecting your computer's security and performance
  • Restoro has been downloaded by 0 readers this month.

DISM is a command-line tool that you can use to diagnose and repair problems, manage the configuration of drivers and packages, and prepare offline images for deployment. Sometimes, the command may not work because elevated permissions are sometimes required to run commands.

While it is useful in what it does, users have come up to complain of dism /online /cleanup-image /restorehealth getting stuck. This happens at various percentages such as 40 and stays that way for a significant amount of time. 

How long should DISM take to run?

The DISM command has several components and you can run either depending on the problem at hand. If you’re not sure which command to go for, we explain how to use the DISM commands to repair your Windows device.

Each component addresses a specific issue and will take a certain amount of time. The three main components include:

  • RestoreHealth – The duration of the DISM restorehealth operation varies based on the amount of damage being repaired. For example, if your Windows image contains multiple corruptions and you’re running DISM with the /RestoreHealth option, which restores all damaged components, it can take several hours to complete.
  • Scanhealth – The ScanHealth option scans the system for any missing or corrupted system files, and replaces them with files from installation media if needed. This operation can also take several minutes to complete. It will depend on how many files need to be replaced and how much free space is available on your system drive (where Windows is installed).
  • CheckHealth – This option checks the health of the service image and reports any errors that it finds. It can take several minutes, depending on the size of your Windows installation files and how many errors are reported by DISM.

Other factors that play a part in how long the commands will run include:

  • Speed of your PC – If you’re trying to repair a Windows PC with DISM, it will take longer if your computer is slow or has low RAM.
  • The number and size of files – The more files, the longer it will take. Some files are bigger than others, so this will also affect the time.
  • Speed of your internet connectionA slow PC with a fast internet connection is going to take longer than a fast PC with a slow internet connection.

How do I fix DISM Online cleanup image RestoreHealth if it’s stuck?

A few preliminary checks before moving on to the slightly advanced solutions include:

  • Ensure you’re typing the command correctly with no spelling errors or missing spaces.
  • Check if your computer has enough RAM.
  • Ensure you’re running the command from an elevated command or with an administrator account.
  • Sometimes, nothing is wrong, and you just have to wait it out.
  • Restart your PC.

1. Run the CHKDSK command

  1. Hit the Windows key, type cmd in the search bar, and click Run as administrator.cmd-run-admin-w11 unexpected kernel mode trap windows 11
  2. Type the following command, replace the C letter with your drive’s letter, and press Enter: chkdsk C: /fchkdsk-c-f ntoskrnl.exe bsod

Expert tip:

SPONSORED

Some PC issues are hard to tackle, especially when it comes to corrupted repositories or missing Windows files. If you are having troubles fixing an error, your system may be partially broken.
We recommend installing Restoro, a tool that will scan your machine and identify what the fault is.
Click here to download and start repairing.

The chkdsk command checks the disk for errors and fixes them. It can take a long time to run, depending on the size of your disk and the number of errors it finds.

2. Run the SFC command

  1. Hit the Windows key, type cmd in the search bar, and click Run as administrator.cmd-run-admin-w11 unexpected kernel mode trap windows 11
  2. Type the following command and hit Enter: sfc /scannowsfc netio sys
  3. Restart your PC.

If you’re having trouble with the DISM command and need to repair your system, you can use the built-in System File Checker (SFC) tool. It will detect missing or corrupted system files and replace them.

3. Update your OS

  1. Hit the Windows key and click on Settings.
  2. Select Windows Update and click on Check for updates.check-updates-w11 windows 11 blue screen
  3. Download and install if available.

If none of these work, consider starting your PC in Safe Mode. When you start your PC in safe mode, it will run only the essential system processes and services. Safe Mode is a troubleshooting option that can help you fix a problem on your PC.

It also verifies that a recent change or update is not causing the problem. If the DISM command executes successfully, start your PC normally and run it again.  A section of users was also able to resolve the issue by performing an in-place upgrade.

We can also help if your DISM command fails completely so ensure to check out our comprehensive article for possible fixes.

Do let us know of any additional solutions that may have worked for you but are not mentioned here in the comment section below.

Still having issues? Fix them with this tool:

SPONSORED

If the advices above haven't solved your issue, your PC may experience deeper Windows problems. We recommend downloading this PC Repair tool (rated Great on TrustPilot.com) to easily address them. After installation, simply click the Start Scan button and then press on Repair All.

This article covers:Topics: