# Disk Cleanup

Disk Cleanup (cleanmgr.exe) is a computer maintenance utility included in Microsoft Windows designed to free up disk space. It was introduced in Windows 98 and has been a part of Microsoft Windows ever since.
In 2018, Microsoft introduced a second cleanup utility 'Storage Sense' in the Settings app with Windows 10 version 1803, but Disk Cleanup remained with Windows. As of 2024, it is not marked as deprecated. Windows 11 introduced "Cleanup recommendations" as an 'easy to use' alternative to Disk Cleanup, replacing Storage Sense.

## Overview

The utility searches files that are no longer of any use, and enables the user to delete them. The candidates for deletion are categorized as:
* "Windows Update Cleanup": Copies of Windows updates that are already installed
* "Microsoft Defender Antivirus": Temporary files that Microsoft Defender Antivirus no longer needs
* "Windows Update log files": Log files that Windows update has created for troubleshooting
* "Downloaded Program Files" (deprecated): ActiveX controls and Java applets that Internet Explorer has downloaded from the Internet.
* "DirectX Shader Cache": Created by video games that use DirectX to speed up execution
* "Delivery Optimization Files": Files (temporary or otherwise) that Delivery Optimization has downloaded
* "Device driver packages": Used to install device drivers and otherwise unnecessary
* "Language Resource Files": Removed if they are redundant
* "Recycle Bin": Content of the Windows Recycle Bin for the current user only
* "Temporary Files": Files in the Windows TEMP folder that are not in use and have been created at least 48 hours ago
The above list, however, is not exhaustive. For instance, 'Temporary Remote Desktop files' and 'Temporary Sync Files' may appear only under certain computer configurations, differences such as Windows Operating System and use of additional programs such as Remote Desktop. The option of removing hibernation data may not be ideal for some users as this may remove the hibernate option.
Aside from removing unnecessary files, users also have the option of compressing files that have not been accessed over a set period of time. This option provides a systematic compression scheme. Infrequently accessed files are compressed to free up disk space while leaving the frequently used files uncompressed for faster read/write access times. If after file compression, a user wishes to access a compressed file, the access times may be increased and vary from system to system.
In addition to the categories that appear on the Disk Cleanup tab, the More Options tab offers additional options for freeing up hard drive space through removal of optional Windows components, installed programs, and all but the most recent System Restore point or Shadow Copy data in some versions of Microsoft Windows.

## Storage Sense

Starting with Windows 10 version 1803, Microsoft integrated some of Disk Cleanup's capabilities into the Settings app. Dubbed Storage Sense, this new tool can automatically run when the disk space becomes scarce. In Windows 11, this tool was subsumed under "Cleanup recommendations" as an 'easy to use' alternative to Disk Cleanup, replacing Storage Sense.
Despite the new additions to Windows, Disk Cleanup remained with Windows. As of 2024, it is not marked as deprecated.