On my Windows Server 2008 R2 (SBS 2011) i have found more than 25 GB of files that seem to be junk:

%WinDir%\assembly\NativeImages_v2.0.50727_32\Temp\ - 6.9 GB (656 files in 675 folders)
%WinDir%\assembly\NativeImages_v2.0.50727_64\Temp\ - 18.5 GB (1174 files in 1198 folders)
%WinDir%\assembly\NativeImages_v4.0.30319_32\Temp\ - 0 GB (0 files in 0 folders)
%WinDir%\assembly\NativeImages_v4.0.30319_64\Temp\ - 0 GB (0 files in 0 folders)

Best visualized with helper utilities such as TreeSize (by JAM Software) or WinDirStat.

Main Question:
Is it safe to manually delete the %WinDir%\assembly\NativeImages*\Temp\ folders?

Bonus Question:
Is it normal to have such a lot of data in those temp folders?
In the "v2.0" folders i have several GB! But in the "v4.0" folders I have 0 bytes.
So I assume that something must have gone wrong with the built-in mechanisms of ngen.exe or mscorsvw.exe to clean the v2.0 "Temp" folders.
I have tried the usual maintenance tasks (with Windows Disk Cleanup etc.), but it still did not free anything in those temp folders.


The related question Is purging %SYSTEMROOT%\assembly\temp safe? is about:
- %WinDir%\assembly\temp\
but here I'm asking about:
- %WinDir%\assembly\NativeImages*\Temp\


4 Answers 4


it certainly isn't normal behaviour. something must have gone wrong.
i have checked multiple machines. including different windows versions. most of them do not show these symptoms.

after doing some more searching i ran across a discussion thread (in german language) here: http://www.mcseboard.de/topic/210325-exchange-m%C3%BCllt-c-zu/

there the OP mentions a particular antivirus software by "g data".
and yes, on all of my machines that are showing these symptoms i have also installed this antivirus software. either the personal edition "g data antivirus" or the "business" edition "".

so far i have confirmed this symptom on: windows 7, windows 10, windows 2008 r2.
i have also tested and reproduced the symptom on a "clean" machine: the temp folders are empty. then i installed this antivirus software. once i install some updates for the .net framework it is now leaking files in the NativeImages temp folders.

i had opened a support ticket with the vendor.
the support team has confirmed they already know about this issue and that they're working on a fix for both, the business and the personal edition of their antivirus software.
they have not come back with a clear answer weather it's safe to manually delete the leaked files.

anyways, i have manually emptied those folders and have not faced any issues so far.

  • How is the support ticket progressing? Can you share a link where we can follow along? I just manually deleted 60 gigs of mentioned temp folders. This is ridiculous. May 17, 2018 at 8:54

It should be safe to delete the contents of this folder, it's used for the .NET Global Assembly Cache (GAC). I would leave the folder itself alone, just delete the contents. Worse thing that could happen is .NET breaks, and a reinstall of it should resolve that problem.


You can safely delete the temp folders as long as you leave your assembly directory intact:

rmdir c:\windows\assembly\NativeImages_v2.0.50727_64\Temp\ /s /q

rmdir c:\windows\assembly\NativeImages_v2.0.50727_32\Temp\ /s /q

Then remove G-Data from your computer, reboot

Now you can create your nativeimages with:

C:\Windows\Microsoft.NET\Framework\v2.0.50727\ngen.exe update

No ZapXXX directories should exist now.

Reinstall G-Data, reboot

You should be safe until the next .NET update, where it all begins unless there is a fix from G-Data


Received Version of EndpointProtection Enterprise today after I opened a ticket with G-Data. It seems this version fixes the problem, I could not reproduce it on two different systems anymore

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .