How to Free Up Space on C: Drive

gr8gonzoConsultant
CERTIFIED EXPERT
Published:
Run out of room on your C: drive? Here are some handy tips.
Unless you have a huge drive dedicated to your C: drive, which is often the drive containing Windows, you've probably run out of room once or twice and had to scramble to free up some room so things keep working.

Usually the C: drive has a bunch of common things on it:
- Your Windows installation in C:\Windows
- Your installed programs in C:\Program Files and C:\Program Files (x86)
- Some application data in C:\ProgramData (usually a hidden folder)
- Your user profile(s) in C:\Users
- Your virtual memory pagefile at C:\pagefile.sys

Each of these things probably grows over time, some faster than others. Your user profile has stuff like a lot of your application data and settings, and downloads, and your desktop and documents folders, so that thing can really grow pretty large.

So let's say you run out of space and you're considering options. Let's take a look at each of them.

The C:\Windows\SxS Folder

First and foremost, a LOT of people will run a tool like TreeSize and see that C:\Windows\WinSxS is HUGE, so there's a natural temptation to figure out a way to reduce this size. DON'T TOUCH THIS FOLDER. It is not truly as big as it seems. It is a special folder that contains a bunch of "links" that look like regular files, so tools like TreeSize will see 10 files that seem like duplicates. However, Windows actually just stores one real copy and creates 9 links, but those links will act and look like regular files, so they get miscounted. Usually the C:\Windows\WinSxS is a mere fraction of its reported size, and if you mess with it, you can actually either crash your PC or make it take up MORE space! So no matter what anyone says otherwise, DON'T TOUCH C:\WINDOWS\WINSXS!

The Disk Cleanup Tool

The first option you should always explore is the Disk Cleanup tool that comes with Windows (which you can find simply by typing Disk Cleanup into the Windows search bar or by running cleanmgr.exe).


The Disk Cleanup tool looks at all the files that are typically safe to delete. This is usually temporary files and files that can be auto-generated (e.g. folder thumbnails). If you don't regularly clean up temp files, this can really add up and you can sometimes get back many gigabytes of free space that is otherwise wasted.

That said, usually the Disk Cleanup tool is a quick band-aid for a drive that is completely out of space. It does often free up some space, but not usually an amount that will give you another year's worth of space.

Move the Paging File

There is usually a hidden file on your C: drive called pagefile.sys. It often reflects the amount of installed RAM you have or a similar amount. So if you have 32 GB of RAM, you might have a 32 GB or 40 GB pagefile.sys sitting on your C: drive.

This paging file is virtual memory and Windows uses it to help balance out the use of your physical / hardware RAM.

Technically speaking, it's an optional feature, and if you have enough RAM, you can choose to disable the paging file completely, but it's usually better to have one, especially if you're someone who likes to have a lot of applications or browser windows open at the same time.

So let's say you have a D: partition that has plenty of free space on it - you can tell Windows to move the paging file over to that partition instead of your C:, which can free up a large amount of additional space on your C:.

To manage your page file, go into your Advanced System Settings (on Windows 10 this is Control Panel > System > About > Advanced System Settings link near the bottom) or you can just run the command:
sysdm.cpl ,3
Note the space between "cpl" and the comma. That's just telling Windows that you want to run the sysdm.cpl (System Properties control panel popup) and switch to the 3rd tab (Advanced).

Once you're in the Advanced tab of System Properties, click on the Settings... button within the Performance area, then go to the Advanced tab of the Performance Options window, and click on the Change... button in the Virtual Memory area:


You should see a Virtual Memory window pop up that might look like this:



Make note of what's "Currently allocated" at the bottom (in my example, it's 38912 MB), and then uncheck the "Automatically manage..." checkbox at the top.

Next, select your D: partition (or whatever drive you want to have the paging file on), and select "Custom size" and ensure the Initial size matches the currently-allocated number. Then set the maximum size to something a little above that. (You CAN also just choose System managed size if you have lots of space on that drive and want to let Windows handle everything automatically). Finally, click the Set button to save the settings for that particular drive/partition:


Now go back to the C: and you can either completely disable the paging file or better, you can set it down to a size that allows some improved error reporting upon crashing, which is 800 MB on Windows 10:



It's worth noting that if you have multiple PHYSICAL drives (e.g. C: is on an SSD and X: is on a separate SSD), moving the paging file to a separate physical drive can improve Windows performance.

Once you have everything set, click on OK, and then reboot to make the changes active.

Manage Your Restore Points

Within the same System Properties dialog box, there is a System Protection tab:

A System Restore point is extremely valuable. While you CAN save space by turning off System Restores for a given drive, or deleting them, it's strongly recommended that you do NOT do this. Since around the time of Windows 10, Windows Updates have been notorious for causing unexpected failures (they used to happen before Windows 10, but the frequency has gone up a lot), and a System Restore point may be the one thing that saves your bacon when you come to your computer only to find it unable to boot after an update!

If you're desperate for space, you can Configure the restore settings on a drive to reduce the amount of space that is reserved for restore points, but it's best to leave this alone if you can. It's only mentioned here so you know what NOT to change!

Repartioning a Drive

Moving on, the next common thing is for people to have their drive partitioned into C: and D:, with D: having a bunch more of the space. So if you had a 1 TB drive, you might have 250 GB for C: and D: gets the remaining 750 GB (or so). So people will say, "I can just resize the partitions so C: and D: are both 500 GB!"

However, it's not always that simple, especially if you have data on the "from" partition (D: drive in this example).

Imagine your physical disk is one long warehouse room. In the middle of that warehouse room is a curtain that partitions the room into two pieces. Whenever anyone puts stuff into one of the half-rooms, they usually fill it from the front to the back, like this:


If you want to move that curtain to one of the half-rooms bigger or smaller, you can only move the curtain in a direction where there isn't stuff in the way. So in the above diagram, you could move the curtain to the left to make the left side smaller, because there's space there. However, you could NOT just move the curtain to the right to make the right side smaller, because there's stuff in the way. 

There's enough free space in the right room that you could move the existing stuff over a little bit and THEN shift the curtain:

Similarly, even if there was a bunch of empty space on the left side, if there happened to be one thing at the very end of the room for some reason:


 ...it would prevent you from moving the curtain to the left until you moved that piece out of the way:


While in real life, moving the curtain would automatically change both sides, that's not the case with drive partitions. Shrinking the left side will not expand the right side. Shrinking the right side will not expand the left side. With drives, if you shrink one partition, it leaves the previously-used space as unallocated:


...and then it's up to you whether you want to expand a partition to use that unallocated space.

Windows disk management tools will stick to the basic tasks of being able to move the curtain (or set it up in the first place), but it won't move the furniture for you. That's where the 3rd party tools come into the picture - most of them will figure out the full job (moving furniture / stuff out of the way and then resizing) and set up a more complex multi-step job that does everything.

I used PartitionMagic a while back but that no longer exists - here are some similar products:

Gparted
Acronis Disk Director
Paragon Partition Manager
EaseUS Partition Master

DISCLOSURE: I have no affiliation with any of the products mentioned and cannot vouch for their functionality beyond knowing that they are well-known partitioning tools.

Junctions

One of the most effective and quick ways to free up space is to use junctions to move folders from one partition to another without breaking their path.

Let's say you have C:\HugeFolder and for some reason, there are programs that have the path "C:\HugeFolder" hardcoded so you figure, "I can't move HugeFolder to D: drive, so I -have- to change the partition to make C: bigger!"

However, what you can do is simply move C:\HugeFolder to D:\HugeFolder, and after it's done, run the following command in the command prompt as an admin:

mklink /J C:\HugeFolder D:\HugeFolder

The syntax to create a junction is:

mklink /J <"fake" path> <"real" path>

So now you (and all your programs) can still access C:\HugeFolder, but they're secretly being served up from D:\HugeFolder. So you've freed up space on C: without having to adjust partition sizes.

A warning - don't use junctions on anything that Windows manages! For example, don't move C:\Windows to D:\Windows and create a junction (or the same with any Windows subfolders). There are some special folders that utilize things like hard links (e.g. the WinSxS folder mentioned above) and messing with them can cause problems.

It's not recommended to do a junction on an entire user profile (it's doable but not recommended due to the complexity), but you can safely do a junction on some of the subfolders within a user profile (e.g. your Downloads folder).

Basically, if it's a custom folder you've created, you should be okay to move it with a junction. If it's a folder haven't created, you might want to ask for additional advice whether it's safe to move it.

NOTE: Never create a junction that links to a removable or temporary device! Moving some often-used files to a USB flash drive can create serious performance issues!


Remove Duplicate Files

This is especially prevalent with photography, but there are many situations where you might end up with a lot of truly-duplicate files. There are tools out there like UltraFinder and the like, which will scan your drive to try and quickly find duplicate files that you can optionally delete. 

Be very cautious with doing this, because sometimes duplicates are actually necessary (e.g. some business applications can be installed multiple times for legitimate reasons, and deleting a duplicate file might cause one of them to fail). When in doubt, make a list of the duplicates you're removing and simply move them to a USB flash drive instead. 


Manage Your Games


These days, a lot of people who run out of room are gamers that use platforms like Steam to download and manage their games. A single game can be huge, with AAA titles sometimes eating up 50 gigabytes of space or more, and even smaller games eating up 1 or 2 gigabytes.

Again, if you have a separate drive, most platforms have advanced settings that allow you to install all your games to a separate drive / location.

Additionally, some games allow users to create a large number of save files, and each save file can sometimes be multiple megabytes. Over a long period of time, thousands of save files across multiple games can really add up to significant disk usage.

The catch is that many games do not compress their save files. So if you want to keep some old saves for some reason, consider compressing them into a ZIP file (or better yet, a .7z file using 7-Zip). Several gigabytes of save game files might end up compressing down to just a hundred megabytes!


There are quite a few other possible things you can do that may depend on your specific circumstances and what is actually eating up your drive space, but hopefully this list should give you a good start to the freeing-up process!

Copyright © 2022 - Jonathan Hilgeman. All Rights Reserved.  
2
605 Views
gr8gonzoConsultant
CERTIFIED EXPERT

Comments (1)

CERTIFIED EXPERT
Most Valuable Expert 2023
Most Valuable Expert 2013

Commented:
So much useful & practical information here.
As the owner of a massive Steam library absolutely agree. Set aside a separate drive for games, Steam allows you to remove the game files but retain all your saves so consider a prune of those you no longer play now and again but NEVER PUT YOUR STEAM FOLDER ON C: !!
Particularly love the drive partitioning analogies.  When I first saw these I missed that they were overhead plan view and imagined that behind the "partition" curtains were enormous barrels of beer! (Probably just me but hey ho ...)

Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.