DISM is a powerful utility inside of Windows 10. It can be used with the Command Prompt command line and can be used for a variety of purposes. But still, it is prone to encounter some errors. One such error is – The scratch directory size might be insufficient to perform this operation. This error is caused when the DISM command is executed from the Windows Recovery Environment, due to the limited size permissions of a directory where the operation is being performed.
The scratch directory size might be insufficient to perform this operation
We need to specify a scratch directory that contains the Windows Folder.
For that, you can either use the DIR command or the BCDEDIT command to find out the location of the Windows folder inside a particular drive.
If the Windows folder is found to be inside the C:\ partition.
Inside that, create a folder named scratch.
To do that, run the following command in CMD-
It will create a directory inside the root of C:\ partition named as Scratch.
Now, whenever you need to run any of the DISM commands, you need to enter the following code snippet in your commands-
For example, if you are using the DISM command to repair the offline Windows Image, instead of:
Dism /Online /Cleanup-Image /RestoreHealth
You need to use:
DISM /Image:C:\ /ScratchDir:C:\Scratch /Cleanup-Image /Restorehealth
If you wish to remove a selected installed update package ( In this code, as an example, I have used:
using the DISM Commands, you can use the following command:
DISM /image:C:\ /ScratchDir:C:\Scratch /Remove-Package /PackageName:Package_for_RollupFix~31bf3856ad364e75~amd64~~16222.214.171.124
In the given command examples above, you need to replace the drive letter with the new code snippet.
Does this help?