Problem med kommando DISM /online /CleanupImage /RestoreHealth

Trond Gunnar Raa 125 Reputation points
2024-11-09T18:23:27.1833333+00:00

I'm trying to run the following command from the terminal as an administrator: DISM /Online /Cleanup-Image /StartComponentCleanup. The program runs up to 63.3%, but then the scan stops. The PC has been running for over 60 minutes. I then choose to terminate, but upon reboot, I get the following message: "Updates are in progress, do not turn off the computer." Upon startup, I go to settings>storage, and see that the occupied space on the hard drive has increased from 58 GB to approximately 80 GB, and temporary files have increased by approximately 20 GB. I then delete all files, without any significant result. I then manually delete using Win+R (run) and enter the commands Temp and %temp%. All files are deleted and the folders are empty (equivalent to the same command as (Users<YourUsername>\AppData\Local\Temp). I then go to file explorer, C:>Windows>SoftwareDistribution. In this folder, there are many and very large files. When I select all and choose to delete, it says "205,000 files are being recycled". Then everything is locked. I then have to go in and delete all files manually one by one. After all folders are deleted, temporary files still show 3.2 GB, which is an increase of approximately 2 GB before this problem occurred. I refer to my previous posts here on the forum with problems around deleting temporary files. I have performed all tasks that have been suggested previously, including 3rd party programs like CCleaner. The programs do not find any more temporary files. After updating to 24H2, many errors have also occurred at PC startup. I see 18 nearly identical error messages in the event log "Unable to start IPF server". However, the PC works as it should. What I want to know first and foremost is why the command StartComponentCleanup locks at 63.3% Are there any other options to solve these problems other than reinstalling Windows 11?

Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Iufor 0 Reputation points
    2024-11-09T18:54:08.9466667+00:00

    Hi

    your DISM command is stalling and leading to storage issues due to temporary file accumulation. Here are a few steps you can try:

    Run the DISM Command in Safe Mode: Restart your computer in Safe Mode and try running DISM /Online /Cleanup-Image /RestoreHealth again. This can prevent conflicts with other processes.

    Clear Windows Update Cache: Open Command Prompt as Administrator, then run these commands to stop the Windows Update service, delete SoftwareDistribution, and restart the service:

    net stop wuauserv

    net stop bits

    del /f /s /q %windir%\SoftwareDistribution

    net start wuauserv

    net start bits

    If these don’t help, a repair install of Windows 11 might be the next step, which will keep your files intact but refresh the system.

    0 comments No comments

  2. Anonymous
    2024-11-12T02:26:36.7466667+00:00

    Hello,

    The DISM tool can sometimes appear to freeze or hang during the cleanup process. This can happen due to various reasons, like corrupted system files, issues with the tool itself, or even underlying hardware problems.

    Check the DISM log: The DISM log file is located at C:\Windows\Logs\DISM\dism.log. This log may provide more details on why the process is stuck.

    Run Check Disk: Run chkdsk /f /r from an elevated Command Prompt to check for hard drive issues.

    Perform a System File Check: You mentioned you have run sfc /scannow, but it might be worth running it again after attempting the above methods.

    Increased temporary files size: The increased size of temporary files might be due to the DISM operation, as it creates a backup of system files before making any changes.

    Disk Cleanup: Use the built-in Disk Cleanup tool to remove system files that are no longer needed, including previous Windows installation files and system logs.

    Manual cleanup: Be cautious with manually deleting files from C:\Windows\SoftwareDistribution, as this is where Windows stores update files. It’s generally safe to delete the contents of the Download folder within SoftwareDistribution

    For IPF server issue:

    Event Viewer Details: Take a closer look at the Event Viewer for the details about these errors. They might point you toward a specific service or application that’s having trouble starting up.

    Clean Boot: Perform a clean boot to see if any third-party services are causing the issue.

    Service Troubleshooting: Try to identify the service related to “IPF server” and consider if it’s essential for your system.

    Best Regards,

    Hania Lian

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.