Delete leftover and unnecessary old system files with the native Windows cleanmgr tool

Software · 4 mins read

It is widely known that the native processes of keeping and updating Windows generates a considerable amount of leftover files that in some cases occupy several GBs of disk space, especially after stepping up to a newer build. Some of these leftover files are purposefully put aside by the system, for it (or the user) to be able to rollback to the previous Windows build after a major update failure, or the user be able to uninstall a specific update package after observing issues or system instability related to it. Rule of the thumb, I would suggest that after a while on the newer build or after package update installation without apparent bugs or issues, you may safely delete those. Nonetheless considering the worst case, I strongly recommend that you avoid rolling back your system if possible, and opt instead to wait for a fix to become available, since there are less risks in a posterior bugfix situation than in a local rollback.

Albeit apparently unarfull in systems with large amounts of free storage space, those leftover files add to the existing resource load, increasing the MFT size and complexity while augmenting at the same time the chances of fragmentation(relevant for HDDs). A lighter index base will always improve latencies and file system agility, not to mention less pressure on the NAND controller with more overprovisioning space and potentially fewer NAND bit switches due to the reduced amount of written files(on SSDs).

Fortunately, Windows has a tool that helps us accomplish the task of safely cleaning the system of those files.

So the first step is to run the Command Prompt as an administrator. We can opt to run from the Start menu > Windows System > right click in Command Prompt > More > Run as administrator, OR by right clicking in the start button > Command Prompt (Admin). Then just write the following command and argument followed by Enter:

cleanmgr -sageset:1

A small window will appear, allowing us to choose which elements we want it to scrutinize in the cleaning process. I personally recommend all checks with the exception of “Downloads”, since that would delete the entirety of the standard path for the download folder. After that step, just click OK and go back to the Command Prompt. To initiate the cleaning process you just need to write the following command and argument followed by Enter:

cleanmgr -sagerun:1

This process may take some time to complete, especially on systems with considerable amounts of files left by successive update runs.

Share:  EMail · Reddit · Twitter · Telegram · Whatsapp · Threema

Back to previous page