One of the most useful and powerful built-in utility in Windows 10 is the DISM tool. This tool can be used with the Command Prompt command line as well as for other purposes. However, it is not without flaws and there are times when you may encounter some issues while using it.
One of the problems you can get while using the DISM tool is the following error:
“The scratch directory size might be insufficient to perform this operation”
This kind of error in DISM occurs when the DISM command is executed from the Windows Recovery Environment due to the limited size permissions of a delivery where the operating is being performed. To fix this DISM error, you need to follow the instructions laid out below.
First, tap the Win + R keys to open the Run utility and then type “cmd” in the field and tap Enter to open Command Prompt.
Next, you have to specify a scratch directory that contains the Windows folder and to do that, you can either use the DIR command or the BCEDIT command. So in the elevated command prompt type and enter “dir”
After that, you will see a list of folders inside the C: partition. Now you have to create a folder named “scratch” inside the partition. To do so, execute the following command:
The command you just entered will create a directory inside the root of the C: partition named Scratch.
Now that you’ve created the Scratch folder, note that each time you run any of the DISM commands, you have to enter the following code snippet in them:
For instance, if you are using the DISM tool to repair the offline Windows image, instead of executing the “Dism /Online /Cleanup-Image /RestoreHealth” command, you now have to execute the “DISM /Image:C: /ScratchDir:C: Scratch /Cleanup-Image /Restorehealth” command. And if you want to remove a selected installed update package, you can use the “DISM /image:C: /ScratchDir:C:Scratch /Remove-Package /PackageName:Package_for_RollupFix~31bf3856ad364e75~amd64~~162184.108.40.206” command. Keep in mind that the mentioned package is only an example. And lastly, you also have to replace the drive letter in the new code snippet when you execute the commands given above.