I found that one of my servers had very low free space on the C drive, and by using TreeSize I found that 9GB was being consumed by the folder C:\Windows\assembly\temp:
This isn’t supposed to happen, the temp folder is used for .Net Global Assembly Cache (GAC) uninstalls (whereas the tmp folder is used for installs). It seems as though these folders should be tidied up automatically, but clearly sometimes are not.
The assembly folder is also a bit interesting to work with via Windows Explorer. You can do some fiddling around with a desktop.ini file and delete the folders via Explorer, or use my method, which is via the command line. I am doing this to a remote machine – you don’t want to be on the console of a server unless strictly necessary, and this is not one of those times.
pushd \\problemserver\c$\windows\assembly\temp for /f %i in ('dir /b') do rd /s /q %i popd
which takes a little while to go through and delete the folders. Some won’t delete, giving Access is denied errors, but most seem to. Here’s an updated TreeSize view of the same server after running the above commands:
Clearly, if you run an rd /s /q anywhere inside your Windows folder (or anywhere at all, for that matter) you’d better be sure you are in the right place and are happy about the stuff it’s going to delete prior to pushing the button! You are responsible for what you do to your own systems.