Get rid of unnecessary files with the help of the Clean Up System Files feature.
Windows 10 has a feature built into the Disk Cleanup tool called Clean Up System Files that not many people take full advantage of. This feature is designed to help you regain valuable hard disk space by removing system files that are no longer necessary to the functioning of the operating system—old installation files, Windows Update leftovers, and outdated device drivers, just to name a few.
In this article, I'll take a closer look at the Disk Cleanup tool and then focus in on the Clean Up System Files feature. As I do, I'll give you a little background on the types of files that this tool is designed to remove from your hard disk.
Note: Before you attempt any of the steps shown in this article, I recommend that you restart your system to ensure that any pending Windows Update operations are complete and to ensure you are beginning with a clean slate.
The WinSxS folder
If you used the Windows operating system back in the Windows 9.x days, you're familiar with the term DLL Hell. This situation arose when you installed different programs that included updated versions of DLL (Dynamic Link Library) files with the same name as files already on the system. These duplicate files would wreak havoc with applications and the operating system. For example, an application would look for a specific version of a DLL file, but find a newer version that was recently updated by another program. Since the version was different, the application would act strangely or crash altogether.
By the time Windows Vista was introduced, Microsoft had solved the problem by creating a new technology called componentization, which uses a folder called WinSxS, which allows the operating system to store and keep track of all kinds of operating system files, DLLs included, with the same name but different versions. (WinSxS is short for Windows Side-by-Side and refers to using files with the same name but with different version numbers at the same time in the operating system.)
As things evolved, the WinSxS folder also became the perfect place to store files added to the operating system by Windows Update. As you probably know from firsthand experience, Microsoft releases a multitude of updates every month to keep up with bugs, new applications, and security problems, just to name a few of the reasons for regular updates. To make sure that the updates don't cause compatibility problems, all kinds of duplicate files get stored in the WinSxS folder so that everything can continue to function correctly. Furthermore, many Windows updates are designed such that if they do cause unanticipated compatibility problems, they can be uninstalled and the files can be reverted to a previous state.
While this is a pretty simplified description of the WinSxS folder, the general idea I want to convey here is that the WinSxS folder can grow so large that it takes up a good chunk of hard disk space. The problem gets compounded by the fact that the WinSxS folder is used to store so many files. This means that old files as well as files that are no longer necessary can still be taking up hard disk space.
For instance, Figure A shows the WinSxS folder properties dialog on a system that began as a Windows 7 system, which was upgraded to Windows 8.x and again to Windows 10. As you can see, the WinSxS folder on this system contains 60,209 files and takes up a grand total of 6.73 GB of hard disk space.
The WinSxS folder can be quite large.
If you want more technical details about the origin of componentization and the WinSxS folder, you can view this 2008 post from the Ask the Core Team blog on the Microsoft TechNet site.
The Disk Cleanup tool
The Disk Cleanup tool has been around for quite some time. Its job is to make it easy to clean out old and unnecessary files that can clog up your hard disk. It's the perfect place for the Clean Up System Files feature to live, since it's designed to weed through the WinSxS folder and eliminate waste. Rather than just jumping straight into the Clean up system files feature, let's look at the Disk Cleanup tool as a whole and then delve into the how the feature works.
To easily run the Disk Cleanup tool, launch File Explorer, select This PC, and select Local Disk (C:). To continue, select the Drive Tools Manage tab and click the Cleanup button, as shown in Figure B.
You can launch Disk Cleanup from within File Explorer.
Once you launch Disk Cleanup, it will begin to analyze the files on your hard disk to determine what can be safely removed, as shown in Figure C.
The Disk Cleanup tool will scan your hard disk and locate files that can be removed to free up space.
Once the disk space analysis is complete, you'll see the main Disk Cleanup interface (Figure D), which essentially lists the categories or locations containing unnecessary files on your hard disk that can be removed. Adjacent to each category you'll see the size of the unnecessary files as well as a check box that allows you to specify that you want to remove those files.
The main feature of the Disk Cleanup interface is the Files to delete scrolling list.
Beneath the list is a number indicating the total amount of disk space you'll gain by removing the selected files. And below that is the description panel, which offers more details about the selected category. The categories in the list will depend on what the Disk Cleanup tool found on your hard disk. Table A shows some of the most common categories you will find in Disk Cleanup, along with the descriptions provided.
Most common categories listed in the Disk Cleanup tool
As you select the various categories in the list, a View Files button may appear. If it does, you can click it to launch a separate File Explorer window that will show the unnecessary files stored in that location. Keep in mind that the View Files button is not available for all of the categories.
The Clean Up System Files feature
If you refer back to Figure C, you'll see the Clean Up System Files button next to the View Files button. Note: This button is flagged with the UAC (User Account Control) icon. Depending on your UAC setting you may see a UAC prompt when you select that button.
When you click the Clean Up System Files button, Disk Cleanup will display a screen similar to the one shown in Figure B as it analyzes additional locations on your hard disk to determine what can be safely removed. When the main Disk Cleanup interface returns, you'll see several additional categories. Table B shows some of the most common categories in Disk Cleanup's Files To Delete list after you click the Clean Up System Files button.
Categories that appear in Disk Cleanup when you select the Clean Up system files button
Running Disk Cleanup
When you select some or all of the various categories, take note of them and the value in the Total Amount Of Disk Space You Gain row. On my example system, I selected all the categories, and Disk Cleanup reported that I would gain 2.90 GB of disk space. When you're ready, click OK. Disk Cleanup will prompt you to confirm that you want to permanently delete the selected files, as shown in Figure E.
Disk Cleanup will prompt you to confirm the permanent delete operation.
When you click Delete Files, Disk Cleanup will go to work cleaning up all the files in the categories you selected, as shown in Figure F.
Disk Cleanup will remove any unnecessary files.
The end result
When Disk Cleanup is done, the dialog will just close. Unfortunately, you won't receive any feedback on the success of the operation. However, you will want to restart your system once Disk Cleanup completes its operation. After your system restarts, check the results manually by launching Disk Cleanup, selecting the categories you selected the first time through, and taking note of the value in the Total amount Of Disk Space You Gain row.
As you can see in Figure G, on my example system I went from 2.90 GB down to 55.2 MB—which means that I gained approximately 2.8 GB of hard disk space. A very good gain indeed!
To check your results, rerun Disk Cleanup.
I then went back to the WinSxS folder properties dialog and discovered that the number of files only dropped from 60,209 to 57,993 and the size of the WinSxS folder only dropped from 6.73 GB to 5.78 GB—a small gain. As you survey your results, keep in mind that the Clean Up System Files feature will remove files from the WinSxS folder only if they're no longer needed by the system. You may find that a lot of files have been removed from your system or you may find that very few files have been removed from your system.
Other WinSxS folder cleanup methods
If you have a modest reduction of the size of the WinSxS folder after running Disk Cleanup, stand by for my next article. In it I'll cover some other cleanup methods that directly target the WinSxS folder. Stay tuned!
What's your take?
Have you used Disk Cleanup's Clean Up System Files feature in Windows 10? If so, what kind of disk savings did you encounter? Please take a moment to share your experiences and advice with fellow TechRepublic members.
- Microsoft updates Office 365 with six new Excel functions
- How to use Windows 10's System Restore as a recovery tool
- From DOS to the golden age of Windows: The classic operating systems you can run in the browser (pictures)
- How to access Safe Mode in Windows 10