Free up disk space on a Solid State Drive (SSD) in Windows 10
These days a lot of people are opting for a Solid State Drive (SSD) in their computers. This speeds up the computer significantly but the down side is that they tend to be smaller capacity drives, especially if you go for the cheaper options like the 120GB SSD.
So, you will want to save space where you can and there are a few options available to you depending on your setup and what you are willing to use and not use.
First of all you have the option of turning off the hibernation feature. This feature takes up a lot of disk space as it uses it to store the current activity of your working session. So, if you can do without that, you can turn it off and this will remove the large hiberfil.sys file from your disk and save you space.
To turn off hibernation, right click on your Windows 10 Start Button and select “Command Prompt (Admin)” to bring up a command prompt which has been elevated to an administrator level. Then type in the following command to disable the hibernation on your machine:
powercfg /h off
You will need to then reboot your machine to complete the removal of the hiberfil.sys file from your machine.
If you are using a desktop computer with a SSD as your primary but also have a larger capacity SATA hard drive as a secondary disk, then you can move the pagefile.sys from the root of your C: drive to the secondary larger capacity disk. The pagefile size is dependent on the amount of RAM you have in your machine, so the more RAM you have, the more space the pagefile.sys will take up on your disk.
So, to move the pagefile.sys, carry out the following steps:
Right click on your Windows 10 Start Button and select “System“. This will bring up a box and you will then need to click on “Advanced System Settings” on the left hand side:
This will take you directly into the “Advanced” tab and you should then click on the “Settings” button under Performance:
This will take you in to the “Performance Options” and you should then click on the “Advanced” tab and then click on the “Change” button under the “Virtual memory” section:
You will then see that the default setting is that the “Automatically manage paging file size for all drives” is ticked. You should now untick this box which will allow you to make changes.
Click on the drive that you want to move your pagefile.sys to and then click the “System managed size” radio button. Then click on the “Set” button. You should then click on the drive where your pagefile.sys was originally and click the “No paging file” radio button and click the “Set” button. So your virtual memory should now look something like this:
You should now reboot your machine for the changes to take affect.
You can run the built in Disk Cleanup option in Windows 10 allowing you to clean up significant amount of space like temp files and cache internet files. To do this, left click your Windows 10 Start button and then type “Disk Cleanup“. You should see it appear in your Start Menu. Left click it to start the application.
To start with, you will see a wizard where you can select which drive you want to run disk cleanup on:
Make your selection from the drop down list and click the “OK” button.
This will now start the process of searching for files that it can cleanup from your machine. Once complete, you should see something like this:
However, instead of proceeding from here, you should now go ahead and click on the “Clean up system files” button. This will run the search again and bring back a large number of selections that you can clean up on your disk. This will take a little longer to run through it’s search.
Once this is complete, you can go through the “Files to delete” selection and then click the “OK” button. This will then run through all the files as requested and clean them up. You should notice an immediate difference in your available disk space.
WINDOWS UPDATES CACHE
Once you have tried all the above methods, you should have a significant amount of space now available. However, if you still need to free up more space. There are some more advanced options available to you.
One of them is to completely clear your Windows Updates Cache and database. Although not recommended, if you are desperate, you can go ahead and try this.
First of all, you need to stop the Windows Update service from running to allow you to make changes to the core files. So, go ahead and open up an elevated command prompt. To do this, right click on the Windows 10 Start button and select “Command Prompt (admin)“. In the command prompt window type the following command to stop the Windows Update service:
net stop "windows update"
This will stop the Windows Update service and you should get an output like this:
If you get a message stating that the service is not running, that’s fine and you can carry on to the next step.
You should now browse to the following location which is where the Windows Updates Cache is stored:
You can go ahead and delete all of the folders and files in this location.
You should then go to this location which is where the Windows Update database is stored:
You should go ahead and delete all folders and files in this location.
Once this has completed, reboot your machine and the Windows Update service will go back into the state it wants to run in. Next time you run Windows Updates, it will recreate a smaller database and then start to store files for the available updates from that point. So you can run through this process again later if you start to get low on space again.
The WinSXS folder can get extremely large. It is also a very important folder for Windows and other programs to work with future updates or uninstalls. In a simple way of looking at it, it is the source files for everything you install on your machine including software, drivers and updates. However, you can clean it up using the built in DISM program with Windows 10.
Note that this process really should be your last resort so do not blame us if you screw your machine up!
So, you really are desperate for some more free space if you have gotten this far in the guide so this is what you can do.
Open up an elevated command prompt. To do this, right click on the Windows 10 Start button and select “Command Prompt (admin)“. Then you can use these three commands to try and clean up any orphaned or unused files in your WinSXS folder:
Using the /StartComponentCleanup parameter deletes previous versions of updated components (without a 30 day grace period) and you will not have a 1-hour timeout limitation.
Dism.exe /online /Cleanup-Image /StartComponentCleanup
Using the /ResetBase switch with the /StartComponentCleanup parameter of DISM.exe removes all superseded versions of every component in the component store.
Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
To reduce the amount of space used by a Service Pack, use the /SPSuperseded parameter of Dism.exe to remove any backup components needed for uninstallation of the service pack.
Dism.exe /online /Cleanup-Image /SPSuperseded
Note that these processes can take a long time to run, depending on the spec of your machine, it could run into hours.
Hopefully this guide has helped you in clearing some disk space on your machine and if it has we would love to hear your feedback so please do leave us a comment below.