Resolving the "Unknown Cleanup-Image Option" Error in DISM
If you're encountering the "Unknown Cleanup-Image option" error while using the DISM (Deployment Imaging Service and Management Tool) command in Windows, it might be due to incorrect command syntax, an outdated version of DISM, or system file corruption. This guide will explore the main causes of this error and offer solutions to resolve it.
Causes of the "Unknown Cleanup-Image Option" Error
Common causes for this error include:
- Incorrect command syntax, such as misplaced arguments or typographical errors.
- Incompatible DISM version. Older Windows versions might not support the
Cleanup-Image
command. - System issues or corrupted system files that prevent the command from executing properly.
Correct Usage of the Cleanup-Image Parameter
Ensure you’re using the correct syntax for the DISM command with the Cleanup-Image
parameter. The correct command format is:
DISM /Online /Cleanup-Image /RestoreHealth
Note that after DISM
, you should specify either /Online
or the path to the Windows image file (/Image:path_to_image
), followed by /Cleanup-Image
and the intended action, such as /RestoreHealth
for fixing corrupted files.
Checking the DISM Version
Older versions of Windows might lack support for Cleanup-Image
. To check the DISM version, use:
DISM /?
If Cleanup-Image
isn’t listed among the available options, it’s likely that your DISM version does not support this command.
Checking and Restoring System Files
Corrupted system files can sometimes cause this error. Run the following command to check and repair system files:
sfc /scannow
After the sfc
command completes, restart your computer and try using DISM again.
Updating Your Operating System
If you’re running an outdated version of Windows, updating it to the latest version might enable newer DISM features, including Cleanup-Image
.