Learn how to resolve the DISM error 87 cleanup-image option is unknown issue on Windows 10 and 11 with detailed solutions and troubleshooting tips.
Encountering DISM Error 87 with the message “The cleanup-image option is unknown” is a common issue for Windows users, especially when running the DISM /Online /Cleanup-Image commands. This error can disrupt your attempts to repair or restore a corrupted system image. Whether you’re on Windows 10 or Windows 11, this comprehensive guide will walk you through why this error occurs and how to fix it.
What Is DISM, and Why Is It Important?
DISM, or Deployment Image Servicing and Management, is a Windows command-line tool designed to repair and manage system images. It is widely used to fix corrupted system files, perform maintenance tasks, or prepare Windows images for deployment. However, incorrect usage of the tool can result in errors such as “Error 87: The cleanup-image option is unknown.”
This particular issue arises when users try to execute commands like:
cmdCopy codeDism /Online /Cleanup-Image /ScanHealth
Dism /Online /Cleanup-Image /RestoreHealth
Instead of running successfully, the tool returns an error, making it impossible to proceed with system repairs.
Common Scenarios of DISM Error 87
Many users report that while running DISM /Online /Cleanup-Image /ScanHealth, they receive the message:
“Error 87: The cleanup-image option is unknown.”
Here are some real-life situations where this error occurs:
- The command
DISM /Online /Cleanup-Image /ScanHealth
fails, butDISM /Online /Cleanup-Image /?
works fine, showing the appropriate help information. - On attempting
sfc /scannow
, it either works without issues or fails with “Windows Resource Protection could not start the repair service.” - Errors appear on both Windows 10 and Windows 11, with no clear indication of the root cause.
Why Does the Cleanup-Image Option Return Error 87?
Several factors contribute to “The cleanup-image option is unknown” error in DISM:
- Incorrect Command Syntax: The most common cause of DISM errors is improperly formatted commands. For instance, missing spaces between parameters or options like
/Online
and/Cleanup-Image
can lead to the “Error 87” message. - Lack of Administrator Privileges: Running DISM without administrative rights can cause issues, including the “cleanup-image option is unknown” error.
- Windows Version Compatibility Issues: Some DISM commands are not supported by outdated Windows versions. For example, a Windows 10-specific command may not work on older builds or improperly updated versions of Windows 11.
- Corrupted System Image or DISM Tool: If the DISM tool itself is corrupted or the system image is damaged, commands may fail to execute correctly.
How to Fix DISM Error 87: “The Cleanup-Image Option Is Unknown”
1. Correct the Command Syntax
Incorrect syntax is the primary reason for DISM cleanup-image option is unknown errors. For example:
- Incorrect:
Dism /Online/Cleanup-Image/ScanHealth
- Correct:
Dism /Online /Cleanup-Image /ScanHealth
Ensure there are spaces between /Online
, /Cleanup-Image
, and /ScanHealth
. Double-check your input before pressing Enter.
For detailed guidance, refer to Microsoft’s official documentation: DISM Command-Line Options.
2. Run Command Prompt as Administrator
Lack of administrative privileges is another common issue behind the DISM error 87 the cleanup image option is unknown message. Follow these steps to run CMD as Administrator:
- Press Win + S and type cmd.
- Right-click on Command Prompt and select Run as Administrator.
- Retry the command with the correct syntax:cmdCopy code
DISM /Online /Cleanup-Image /ScanHealth
3. Update Your Windows Version
Outdated Windows versions often lack the necessary support for certain DISM commands. To resolve this:
- Navigate to Settings > Update & Security > Windows Update.
- Click Check for Updates and install any pending updates.
- Restart your system and retry the DISM command.
If you’re running Windows 11, ensure your build is updated to the latest version, as newer commands may not work on older builds.
For more information on version-specific DISM commands, visit: DISM Error 87 for Windows 10.
4. Use the Full DISM Path
Sometimes, specifying the full path of the DISM executable resolves errors:
cmdCopy codeC:\Windows\System32\Dism.exe /Online /Cleanup-Image /ScanHealth
This ensures that the system uses the correct tool for executing the command.
5. Check for Corrupted System Files
If sfc /scannow
returns “Windows Resource Protection could not start the repair service”, you need to ensure that the Windows Modules Installer service is running:
- Press Win + R, type
services.msc
, and hit Enter. - Find Windows Modules Installer, right-click it, and select Start.
- Run the command again:cmdCopy code
sfc /scannow
If the system file checker still fails, proceed to offline repair.
6. Perform an Offline Repair
If the online DISM repair fails, you can use a Windows installation image for an offline repair:
cmdCopy codeDISM /Online /Cleanup-Image /RestoreHealth /Source:WIM:X:\Sources\Install.wim:1 /LimitAccess
Replace X with the drive letter of your installation media. This method bypasses issues caused by online corruption.
7. Reinstall or Repair the DISM Tool
In rare cases, the DISM tool itself may be corrupted. Use the following steps to reinstall or repair it:
- Download the latest version of DISM for your Windows version from Microsoft’s website.
- Replace the existing DISM executable in
C:\Windows\System32
with the new version. - Retry the cleanup-image command.
How to Prevent DISM Errors in the Future
To avoid encountering the DISM error 87 cleanup image option is unknown issue again:
- Keep Your System Updated: Regular updates ensure compatibility with all Windows utilities.
- Follow Correct Syntax: Always double-check your commands before executing them.
- Run Commands with Administrator Privileges: This avoids unnecessary permission-related errors.
Conclusion
The DISM error 87 the cleanup-image option is unknown is a common yet solvable issue for both Windows 10 and Windows 11 users. By ensuring correct syntax, updating your system, and running commands as an administrator, you can easily fix this problem. For more advanced issues, offline repairs or replacing the DISM tool might be necessary.
Visit Our Post Page: Blog Page