Free Up Space on Drive C: of a Windows VPS

A Windows VPS has one disk, drive C:, and additional disks cannot be added. This guide shows how to see what fills it and how to free space with the tools that come with Windows Server. It works the same on a dedicated server. We tested every step on our test VPS with Windows Server 2025 (400 GB disk).


1. See What Fills the Disk

Press Windows+R, type ms-settings:storagesense and press Enter. Or open Start → Settings → System → Storage. The bar (1) shows how much of C: is used and free. Below it, Windows lists the largest categories, for example Temporary files (2). Show more categories (3) lists the rest.

Settings, System, Storage: drive C: with used and free space and the Temporary files category

2. Remove Temporary Files

Click Temporary files. Windows lists what it can remove; the checked items are safe to delete. Click Remove files (1) and confirm with Continue.

Temporary files: the list of files that can be removed and the Remove files button

At the end of the list, Updates (1) shows updates that Windows has downloaded but not installed yet. In the picture they take 6.89 GB, the largest part of all temporary files. They are needed to install the updates, so do not delete them by hand: install them with Windows Update (Windows Update on Windows Server).

Temporary files: Updates with 6.89 GB of downloaded updates

ℹ Downloaded, not installed

Windows Update can be set to download updates and ask before installing them. Downloaded updates then stay on C: until you install them.

3. Clean Up Old Versions of Windows Files

After updates, Windows keeps older versions of its system files in the folder C:\Windows\WinSxS. Never delete anything from this folder by hand. Let Windows clean it: right-click Start, open Terminal (Admin) or Windows PowerShell (Admin) and check first how much can be freed:

Dism.exe /Online /Cleanup-Image /AnalyzeComponentStore

Backups and Disabled Features (1) is the size of the old versions. Component Store Cleanup Recommended (2) says whether a cleanup is worth it.

DISM AnalyzeComponentStore: the size of the component store and whether a cleanup is recommended

Start the cleanup:

Dism.exe /Online /Cleanup-Image /StartComponentCleanup

Wait for The operation completed successfully. (1). This takes about 7 minutes.

DISM StartComponentCleanup: The operation completed successfully

How much it frees depends on how many updates the server has installed. On a new VPS it can free nothing, even when DISM reports reclaimable packages; on a server that has run for months it can be more. Do not add /ResetBase: after it, installed updates can no longer be uninstalled.

Do Not Delete These

  • C:\Windows\WinSxS and C:\Windows\Installer: Windows needs them for updates and for uninstalling programs. Use the cleanup in step 3 instead.
  • C:\pagefile.sys: the paging file of Windows (for example 7 GB). Windows manages its size.
  • C:\Windows\SoftwareDistribution\Download: downloaded updates. Install them instead, see step 2.

If your own files fill the disk, delete what you no longer need, or move it to another place, for example over SFTP to your computer: Transfer Files to Windows Server With SFTP. Before a bigger cleanup, a snapshot lets you go back: How to Create and Restore a VPS Snapshot.


Related Guides

View all Windows VPS guides

Was this answer helpful? 0 Users Found This Useful (0 Votes)