free up space on servers with small C drives

If you have the option of expanding the C drive, that’s often the quickest way to get back up and running, but is often only possible in virtualized environments.  If you’re reading this, that’s probably not an option for you.  This article was originally intended for physical servers that were built with small C drives, however it can also be useful when you need to free up some disk space quickly in order to get a server back up and running.

Quick ways to clear some C space:

  1. Run Disk Cleanup, if you are on a Windows 2008 Server then you won’t have immediate access to disk cleanup but it can be added back using these instructions: https://technet.microsoft.com/en-us/library/ff630161(v=ws.10).aspx
  2. Move the swap file from the C drive to one of the other drives on the server (downside is this requires a reboot.)
  3. Clear out the IIS logs in C:\Windows\system32\logfiles\w3svc
    These files are safe to delete, however I would sort by date and delete all but the most recent file.  This can clear several gigs on an Exchange server or other server with some IIS activity.  To be proactive you could disable IIS logging as well.  Here are steps to turn off IIS logging and delete the log files:
    – Open IIS.
    – Highlight the server name.
    – Under the IIS heading, click on “Logging”
    – On the actions pane one the right, click “Disable”.
    – Exit IIS.
    – Navigate to “C:\inetpubs\logs”
    – Delete the logs folder or all of the contents of the log files (W3SVCx folders)
    – Empty recycle bin
  4. Review the Folders on the C drive for junk thats been downloaded or saved
  5. Right click the C:\Users or C:\Documents and Settings and see how big it is, if it’s huge it could be worth while to drill into folders within profiles and see if there are any huge administrator user profiles, potentially with big downloads in them.  Some applications like Symantec will bury gigantic multi-gig virus definitions in the All Users profile (research this issue if you have it for fixes from Symantec)
  6. Shrinking the space used by Windows Updates:
    – Windows 2008 and newer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/clean-up-the-winsxs-folder?view=windows-11
    – Windows Server 2003, on older servers such as Windows 2003 that were built with small C drives, a last resort is moving windows update uninstall data to another location: To do this, review C:\Windows and sort by date, move all the older ~NTUpdate folders from Windows Updates to a folder on say the D drive you create called “from C-Windows”.  If you need to uninstall a Windows Update in the future you’ll need to move these folders back.  Do this process very carefully, accidentally moving something out of C:\Windows that you shouldn’t have could have bad consequences.
  7. Treesize Free can help determine what’s eating the space as well

Related

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.