DISM Online vs Offline Command: Key Differences & Fix 2026

You run DISM hoping to fix image corruption. But you keep hitting the same inconsistency around 65%. The error doesn’t tell you whether you should use dism /online or boot into recovery for dism /offline. In my experience, mixing these two modes without resetting CBS state is what breaks the process – especially on Windows 11 with KB5148089.

Two steps that actually moved the needle

Instead of guessing which DISM mode is right, focus on clearing the stuck transaction. Here’s what worked after the offline command failed at 65% (CBS.log showed pending.xml corruption).

1. Remove pending.xml from WinSxS

This file locks the component store. Open an elevated Command Prompt and run:

takeown /f C:WindowsWinSxSpending.xml && icacls C:WindowsWinSxSpending.xml /grant administrators:F
del C:WindowsWinSxSpending.xml

If the file doesn’t exist, skip this step – but check CBS.log first; it’s usually the culprit when dism online vs offline command difference causes a hang.

2. Reset CBS using DISM (online mode first)

Run DISM /Online /Cleanup-Image /RestoreHealth. Wait for completion. If it still fails at 65%, switch to offline mode with a mounted image. In some cases, the offline command works better when online servicing can’t access Windows Update sources.

After the reset, the update service can proceed. This didn’t fix everything immediately – I had to restart the Windows Update service and clear SoftwareDistribution once more. But the core inconsistency disappeared.

📌 Partial effectiveness note: The above steps resolved the 65% stuck for three different Windows 10 machines. However, on one Windows 11 system, the offline command continued to fail until I performed a repair install (in-place upgrade). So your mileage may vary.

So what is the real difference between dism online and offline? Online services the running OS, offline works on a mounted image (e.g., from installation media). When you switch between them without cleaning CBS, pending.xml becomes inconsistent – that’s why you see the progress freeze at 65%. A clean CBS reset makes both modes work again.

If you’re still asking “why dism offline fails” after trying these steps, check your image source path. Offline mode requires a valid /Source parameter pointing to a Windows side-by-side folder. And never mix online repair with offline restorehealth in the same session without a reboot.

⚠️ What to avoid: Don’t run dism /online /cleanup-image /restorehealth immediately after a failed offline attempt. Always reset the CBS transaction first (pending.xml deletion) and restart the servicing stack. Also, avoid using the wrong image source path – that will give you error 0x800f081f.

To sum up: the dism online vs offline command difference matters less than the health of your CBS log. Reset pending.xml, run restorehealth once, and stick to one mode per session. That’s the working 2026 guide that got me past the 65% wall.