How to Free Up Storage Space in Windows
On This Page
Disclaimer
This article includes steps on how to delete temporary files. Although temporary files shouldn't contain any personal data or documents, I am not responsible or liable for any data loss that may occur. Follow these steps at your own risk.
Introduction
If your Windows PC is low on storage space, here's how to free it up by removing unnecessary and temporary files.
Install Any Pending Windows Updates
The first thing you should do is install any pending Windows updates. These update files, once downloaded, can take up quite a bit of space on your machine. Installing these updates will give you that space back.
Open Settings.
Go to Windows Update.
Click "Check for Updates".
Windows will then look through the update files downloaded to your machine, and show all of the updates currently available to install.
Click "Install" next to any updates you see listed here.
Delete Personal Files You No Longer Need
If you're not very organised, your PC has probably accumulated quite a bit of junk including old Documents, Downloads and Desktop items. As simple as it sounds, you may be surprised at how much you have lying around that you haven't looked at in a long time. Go through your files and delete what you no longer need.
A useful tool to find large items on your computer is TreeSize. This shows you all files on your machine in order from smallest to largest. Removing system files you do not know the meaning of may cause issues in Windows, requiring a Disk Check or a factory reset to resolve, so proceed with caution and try to avoid removing system files if you are unsure about their purpose.
The folder paths I recommend going through are as follows. Copy and paste them into the path bar at the top of File Explorer.
%userprofile%\Documents
%userprofile%\Downloads
%userprofile%\Desktop
Temporary Files
What are Temporary Files?
Temporary files can be created for many reasons. For example, when you download, install and set up an app, temporary files are created to allow this process to complete. However, after this process is complete, these files don't always get removed. Although they are called "temporary files", Windows doesn't have a rule on what duration of time it takes for the files to be deleted, so these files can accumulate over time and take up quite a lot of storage space - unless the relevant app developer implements a method of automatically deleting the files after use.
Even after deleting these files, they will reaccumulate over time as you use apps and perform other activities on your computer - so I recommend deleting these temporary files at least once every three months. Temporary files typically aren't needed after use, however, if they are they will be recreated.
Delete Temporary Files
Open File Explorer (Windows Key + E).
Type "%temp%" into the path bar at the top and press enter.
Select all of the folders here and delete them (Ctrl + A > Shift + Delete).
OneDrive Offline Mode
What is OneDrive Offline Mode and Online Only Mode?
Offline Mode: OneDrive, if installed on your computer, has a feature called Offline Mode which will download every file you have stored in OneDrive to your local drive on your computer. This can be useful if you don't always have an internet connection and require access to OneDrive files while offline, however this can take up absurd amounts of space on your computer.
Online Only Mode: The better option could be switching to Online Only Mode which means all files are stored in OneDrive only and will only be downloaded to your computer when you attempt to open the file.
Changing to Online Only Mode
The mode can be changed in one of two ways.
For specific files only
Open File Explorer.
Go to OneDrive.
Right-click the files and folders you would like to change to Online Only Mode, and choose "Free up space". The file will now be offloaded from your machine.
For all files
Right click the OneDrive system tray icon on the bottom right of the Taskbar.
Choose "Settings".
Go to the "Sync and backup" tab.
Scroll down and expand the "Advanced" drop-down.
Under "Files On-Demand", select "Free up disk space" followed by "Continue". All OneDrive files will now be offloaded from your machine.
Search Indexing
What is Windows Search Indexing?
When you search for a file or program on your computer, you are searching through a locally stored index database file stored at %ProgramData%\Microsoft\Search\Data\Applications\Windows\Windows.db. The index contains information like filenames, file extensions, file locations, , file sizes and dates. Without an index, searching would take a while.
Sometimes this index can become corrupt or too large, so you may need to lower the amount of files that are indexed or rebuild it altogether.
Remove Items From The Windows Search Index
Open Control Panel.
Type "Indexing Options" into the search box at the top right and click on "Indexing Options" in the list of results.
Here you will see a list of locations that are included in the Windows Search Index. Click on "Modify" followed by "Show all locations" to remove any locations that you do not want Windows to index. Removing items you do not know the meaning of may cause issues when searching for programs and files on your machine, so proceed with caution.
Rebuild The Windows Search Index
If removing items from the Windows Search Index did not free up enough space, you can use TreeSize to navigate to %ProgramData%\Microsoft\Search\Data\Applications\Windows\Windows.db to see how much space the index is taking up in relation to the size of your drive.
If the file size is too large, you can see if rebuilding the index helps.
Open Control Panel.
Type "Indexing Options" into the search box at the top right and click on "Indexing Options" in the list of results.
Click on "Advanced" followed by "Rebuild", and then "OK" to confirm.
The index will now be in the process of being rebuilt. Depending on how many files are selected for indexing, this process could take a while. You can monitor the progress in Control Panel.
Disk Clean-up Tool
Open Run (Windows Key + R).
Type "cleanmgr".
Press Ctrl + Shift + Enter in the Run box to open Disk Clean-up as an administrator.
Once the program is open, you'll see some tick boxes beside some listed items. Tick as many boxes as possible, making sure to read what they are all for. If you think you might need some for something, do not tick them.
Click "OK".
Click "Delete Files".
The Disk Clean-up application will automatically close when the process is complete.
Storage Sense Settings
Open the search menu from the Taskbar.
Type "Storage Sense" and click the first option in the list.
Find the "Storage Sense" toggle and enable it.
Click "Temporary files".
Here you'll see some tick boxes beside some listed items. Tick as many boxes as possible, making sure to read what they are all for. If you think you might need some for something, do not tick them.
Click "Remove files" and wait for the process to complete.
Go back and look through some of the other categories. Delete anything you see that you no longer need.
Close Settings.
Conclusion
Hopefully, this helped you get some space back! If not, maybe you need a bigger hard drive or SSD. I also advise rebooting your PC after following these steps. For further help, please see the official Microsoft documentation.