Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a c:\ on a server that is filling up, most likely due to the accumulation of patches over the years.

I'm told by Microsoft PSS Support that it is unwise to simply delete the compressed uninstall directories within the \Windows directories. Considering that we have 100's of windows servers, this scattering of patches is consuming at significant amount of space on our SAN (these windows servers are in VMWare).

Can you tell me what I can do, besides the list below, to clean up space on the C:\ drive? I'm hoping that you may have more insight than the "v-dash" (non employee) recommendation I received.

  1. Don’t set your Virtual Memory pagefile.sys on C drive.(System Properties\Performance settings\Advanced\change Virtual memory)

  2. Clear temp files (C:\windows\temp and C:\Users\%Username%\AppData\Local\Temp).

  3. Don’t set your temporary Internet files on C drive.(Internet Options\Browsing history settings\move folder)

  4. Move the Windows Search Service Database. If you have started Microsoft Search services, please move Windows.edb file to another drive.

    ( C:\ProgramData\Microsoft\Search\Data\Applications\Windows )

  5. Compress folders to save disk space and use disk cleanup

  6. Use mount point to mount an additional drive.

  7. “Compln.exe” can only be used to clean Service Pack, such as (RTM and SP1). In your system Windows server 2008 r2, it don’t contain any service pack. It cannot clean the patches in your system.

  8. ???? (not sure what this idea is) "Microsoft provide the built-in tool – disk cleanup .(You need to install a feature called "Desktop Experience" to get Disk Cleanup.) "

What other things can be done to clean up your server and free up space?

Lastly, it would be nice to get an idea of what drive size you use for c:\ for whatever version of Windows you use.

share|improve this question
    
No definite answer, might be best as a wiki –  Bart Silverstrim Sep 29 '10 at 14:02
    
That said...not wise to delete the compressed patches in c:\Windows, but if they're old (and won't see having to uninstall the patches), I've been known to move them to temporary consolidated storage, then delete them if there's no side effects. Also if backups are taken religiously then moving the compressed patch dirs shouldn't cause much headache to restore if they're needed. Not the best practice I'm first to admit, but it sheared some excess storage for us (and nothing horrible happened.) –  Bart Silverstrim Sep 29 '10 at 14:04
add comment

4 Answers 4

up vote 3 down vote accepted

Lastly, it would be nice to get an idea of what drive size you use for c:\ for whatever version of Windows you use.

Server 2003: We use 15GB C: drives for these now. We used to use 10GB ones, but the patch-dirs ate us out of house and home. We're not spinning up many of these any more, but if we do, 15GB is it.

Server 2008 & 2008R2: Microsoft itself is saying that 30GB is the number you should be aiming at. Seeing as how they made the patch-dirs nigh undeleteable with these server versions, I'm not going to doubt them. Currently we make our C: drives 20GB, but that's because we made our VM templates before this guidance emerged. We need to change it. 40 is probably better once you factor in 3rd party installers that resolutely stash things on C: no matter what you tell them.

share|improve this answer
2  
We are finding that 40GB is too small for 2008 these days with the continual growth of the Winsxs folder. Every time a patch, service pack or new DLL is installed, that folder can grow larger. –  Doug Luxem Sep 29 '10 at 14:35
add comment

If it's 2008 R2, you can attempt to run dism /online /cleanup-image /spsuperseded. That will get back some space if you've installed SP1 since the initial install. If it was slipstreamed, I doubt you'll get any space back, however.

share|improve this answer
add comment

IIS logs and Windows Error Reports.

  1. C:\inetpub\logs\LogFiles
  2. %LOCALAPPDATA%\CrashDumps

Find a program like SpaceMonger to find the space hogs.

share|improve this answer
add comment

I've used 'junction' by sysinternals to redirect folders like the software distribution directory, or windows search. You can also use the built in mklink command, but junction works on older versions of windows and can be standardized against in automated deployment scripts.

It works wonders for getting a server install running off of a space restricted EEEpc.

For more information on mklink: directory junction vs directory symbolic link?


For a step by step guide regarding specifically the patches directory, try this blog. Entry is appended below with some formatting modifications:

REDIRECTING UPDATES AND THE SOFTWARE DISTRIBUTION FOLDER USING JUNCTION TO ANOTHER HARD DRIVE

Scenario

You have a server with an 8 GB system partition and it keeps filling up. The software distribution folder used by windows updates is a major source of bloat and Microsoft support has said there is nothing you can do to move this folder from the C drive.

Solution

Using the Microsoft Junction Tool found on the Systernals site create a symbolic link to another hard drive or partition. I will use the terms symbolic link and junction interchangeably in this post.

Process

  • Stopping the Windows Update Service and renaming the folder

    Start>Run type cmd and press enter type net stop wuauserv and press enter type rename c:\windows\SoftwareDistribution softwaredistribution.old and press enter

  • Creating a symbolic link using Junction

    In this example the software distribution folder will be redirected from C:\WINDOWS\SoftwareDistribution to the D:\WINDOWS\SoftwareDistribution

  • Creating the Junction

    To create the target directory from the command prompt

    C:\>md D:\Windows\SoftwareDistribution

  • To create the Junction

    C:\>junction C:\WINDOWS\SoftwareDistribution "D:\WINDOWS\SoftwareDistribution"

  • Restart the Windows Update Service

    type net start wuauserv and press enter

    Once everything has been verfieid to be working normally delete the softwaredistribution.old folder.

Jeff Loucks

(You may optionally copy the .old directory's contents into the new location).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.