Gaming PCs
Unit 1, 80 Willow Walk, London SE1 5SY Mon–Sat, 9am–6pm  |  info@creativeit.uk

Windows Server C: drive full? What is safe to clear

· Blog

Call 020 7237 4908

A Windows Server with a full or nearly full C: drive causes more trouble than most people expect. Windows updates fail, services stop or refuse to start, remote desktop logons can fail, and applications such as SQL Server or Exchange may stop accepting work altogether. The good news is that most full system drives can be sorted out safely, as long as you know what you can clear and, just as important, what you must never delete by hand.

First, find out what is actually using the space

Don’t start deleting until you know where the space has gone. Guessing is how people end up removing something the server needs.

  • Use a disk space tool such as TreeSize Free or WinDirStat, run as administrator so it can see protected folders. Both show which folders are largest, so you can spot the problem in minutes.
  • Check whether the space went suddenly or gradually. A drive that filled overnight usually points to one runaway process, such as a log, a backup job or a memory dump. Slow growth over months is more often updates, user profiles or application data.
  • Look at the System and Application event logs for disk warnings and errors (for example events from the disk or Ntfs sources). These can tell you whether you are dealing with a space problem or a drive problem.

Common causes, and how to deal with each safely

The WinSxS folder (component store)

C:\Windows\WinSxS often looks huge, partly because many of the files in it are also linked elsewhere, so Explorer overstates its real size. Never delete files from it manually: that can break updates and Windows features. Instead, from an elevated command prompt:

  • Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore shows its real size and whether a clean-up is recommended.
  • Dism.exe /Online /Cleanup-Image /StartComponentCleanup removes superseded update files safely.

You may see advice to add /ResetBase. That frees more space but means installed updates can no longer be uninstalled, so only use it if you are comfortable with that.

Windows Update download cache

Downloaded update files in C:\Windows\SoftwareDistribution\Download can be cleared. Stop the Windows Update service first (net stop wuauserv), delete the contents of that Download folder only, then start the service again. Windows will download anything it still needs.

Log files that never stop growing

  • IIS logs in C:\inetpub\logs\LogFiles are kept for ever unless something removes them. Old logs can be archived or deleted, and a scheduled clean-up stops it happening again.
  • CBS and DISM logs in C:\Windows\Logs can occasionally grow very large after a failed update.
  • Application logs from backup software, antivirus or line-of-business programs often sit in C:\ProgramData. Check the vendor’s guidance before removing them.

SQL Server and Exchange

These are the two places where a quick delete does the most damage. A SQL Server transaction log (.ldf) that keeps growing usually means the database is in the full recovery model but log backups are not running. The fix is to get log backups working, then shrink the log if needed. Never delete .ldf or .mdf files. With Exchange, transaction logs are normally truncated by a successful Exchange-aware backup. If they are piling up, the backup is failing, and deleting the logs by hand can leave databases that will not mount.

User profiles on Remote Desktop servers

On terminal or Remote Desktop servers, old user profiles can take up a lot of space. Remove profiles of people who have left through System Properties, Advanced, User Profiles, Settings, rather than deleting folders from C:\Users, which leaves broken entries behind.

Shadow copies, memory dumps and hibernation

  • Run vssadmin list shadowstorage to see how much space Volume Shadow Copies are allowed to use. If it is set very high for C:, it can be reduced, though shadow copies are also how users restore previous versions of files.
  • A large C:\Windows\MEMORY.DMP is left behind after a crash. Copy it off if someone needs to investigate the crash, then it can be removed. It is also a hint that the server has blue-screened, which is worth looking into.
  • Servers rarely need hibernation. If hiberfil.sys exists, powercfg /h off removes it.

What you should never delete by hand

  • Anything in C:\Windows\WinSxS or C:\Windows\System32.
  • C:\Windows\Installer: it looks like a cache, but Windows needs it to patch and remove software.
  • pagefile.sys (change its size in system settings if you must, never delete it).
  • Database files, database logs and Exchange logs.
  • Anything you cannot identify. If in doubt, move it to another drive first rather than deleting it.

Giving C: more room

If the server simply needs a bigger system drive, the volume can often be extended. On a virtual machine, enlarge the virtual disk in the hypervisor first. In Disk Management, Extend Volume only works when there is unallocated space directly after the C: partition, and a recovery partition often sits in the way. Moving or removing partitions carries real risk, so make sure you have a recent, tested backup before you start. On a physical server, a larger system drive or array may need to be fitted and the system cloned or migrated.

When a full drive is a symptom of something else

Sometimes the full disk is not the real problem. Watch for these signs:

  • Backups writing to C: by mistake, or local backup copies piling up because the real backup target is unreachable. Check that backups are completing and going where you think they are.
  • Disk errors in the event logs, a RAID controller warning, or files that cannot be read. A failing drive can cause repeated retries, corrupted files and failed updates that look like a space problem. In that case, stop and protect the data before doing any clean-up. Our data recovery service handles failed server drives and arrays.
  • An ageing server where the system drive was sized years ago for a much smaller workload. Sometimes a planned upgrade or migration is the better long-term answer.

Need a hand with your server?

If your server’s C: drive keeps filling up, services have stopped, or you are not sure what is safe to remove, our engineers can help. We provide server repair and support, including disk and RAID problems, and hard disk data recovery if a drive has already failed. Call us on 020 7237 4908, bring the hardware to our Central London repair centre, or use our UK-wide courier collection. Evaluation is free, you get a fixed quote before any work starts, and if we cannot fix it there is no fee. You can also contact us online.

‹ All blog posts

Drive clicking or laptop won't start? Power it off and get it diagnosed today.