Disk space cleanup tools and methods in Windows

Updated: November 1, 2021

Sometimes, you may run out of space in your Windows box. With correct planning, this should never happen. For instance, the operating system (C:) resides on its own partition, you don't constantly install new software, and all of your data and games are kept on separate partitions and drives. This way, apart from an occasional windows update, your disk usage on the C: drive should remain constant.

Assuming you don't do any of these things, disk space usage constraints may come to haunt you. At that point, you need to do some cleanup. Windows has its own share of built-in tools, some better known, some less known. Then, there are various third-party tools. All right. In this article, I want to cover only the official utilities that already exist in Windows, and nothing else. Let's see what they do, and how efficient they are.

Classic disk cleanup

For most people, the simplest, safest and most straightforward utility is the classic disk cleanup, which goes by the executable name of cleanmgr.exe. In more recent versions of Windows, with the unnecessary touch-based simplification of the user interface and an attempt to provide comparable functionality through Settings via Storage Sense and such, people may find it a bit harder to find and launch the classic tool.

Therefore, to that end, note the name of the executable. This way, you can always run it. Now, open Windows Explorer, right-click on the C: drive in the sidebar, and click Properties. Now, click on Disk Cleanup. For the time being, this still works in Windows 11. You're not redirected to use any of the useless modern tools.

Cleanup, properties

The tool will analyze your disk and show you the results. You can also click the Clean up System Files in the bottom left corner, which will relaunch the utility, but it will now also show you system files categories like Windows Update Cleanup. And now, you can clean stuff up, and free your disk space. But wait.

Cleanup, system

What does Windows Update cleanup mean? Very simple: Windows layers updates, so theoretically, you can remove them back as far back as your system baseline. The cleanup "flattens" all your system changes, making it impossible to roll back any updates you've applied. This means that old update catalog files can be removed, which saves space. In my example, roughly 6.5 GB (out of total 8.3 GB). By and large, this is a safe operation.

However, is there a better way? Or faster? Or simpler? Or safer?

DISM

One of the most powerful Windows deployment management tools is the awesome, versatile dism tool, which runs on the command line. Professionals use it to provision their systems, and I used it back in the day to create Windows "service pack" roll ups, so I could deploy XP and Windows 7 machines without having to go through years worth of updates.

DISM can also remove unneeded system files, as well as flatten your installation, by removing the updates and resetting the system base to your latest, current state. In essence, the equivalent command to what the classic Clean Manager shows (with the system files) is as follows:

dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase

Microsoft itself disclaims that the use of the tool can lead to potential data loss. This is an understandable statement, and you should always have system images of your important deployments, plus a strong backup strategy for your data, with multiple copies and verifiable, verified restores.

I ran the command, and it stalled completely on Windows 11 the first time, without doing anything. After a reboot, I ran the command again, and this time, everything was fine. The procedure completed in a few minutes. Now, the question is, how effective is this, especially compared to the ordinary GUI utility?

Going back to the GUI tools, the system now reported a difference of only about 1.5 GB. The Clean Manager had no Windows Updates listed anymore. So about 5 GB of disk space went somewhere. My guess is that because I'm running a Dev Build of Windows 11, which constantly gets updates, the results I'm showing may not reflect the typical behavior on a regular system. It is quite possible that Windows 11 cached downloaded upgrade data and such during my testing. Interesting, no?

Properties, after dism

Properties, after dism

Second attempt

To verify the source of this mystery, I waited another month, then re-run the cleanup. I used the GUI. Again, there was a discrepancy in how much space was actually freed, roughly 1:3 ratio, similar to what I've observed the first time. My free space went down only about 2.1 GB, while the tool said I could save 5.6 GB. For whatever reason, the amount of space you save isn't really what you see in the disk properties. Well.

Results before

Expected savings

Results after

But what about third-party tools?

In general, I always try to get by without relying on non-official solutions. Sometimes, they are necessary, and sometimes, they are superior to the default thing - especially in the more recent versions of Windows. But because the old cleanup tool is an old school thing and written before the era of modern-flat break-things, it's reliable.

And therefore, you don't really need much else. Browsers can clean their own data, Windows can clean temporary files, and even updates and update logs. So there isn't any other magical heap of bytes you can just clear and make your disk gain tons of space. Stick with the simple things. That should do it.

Conclusion

This exercise, by no means exhaustive or conclusive in an overwhelming manner, did show me that the standard GUI cleanup utility is perfectly sensible for all practical purposes, and you don't need to do any special wizardry to free some disk space. It works, and it delivers. Dism is a tool for professionals, and it's also reliable. However, it is not necessary for common home usage tasks. The one thing that I cannot fully account for is the space delta, but then, my test box with its Windows 11 installation is constantly getting updated, so it's not a typical, static system that I normally use and run. Then again, what you see is what you get.

I encountered no problems, errors or bugs, and the sequence of system updates continues without any issues. Either one of these two methods will do. I'd recommended the GUI way, because it won't allow less skilled people to run random commands and cause damage. Finally, most importantly, build your systems in a manner that won't ever necessitate these types of cleanups. And we're done, fellas.

Cheers.

You may also like: