You can add Disk Cleanup the the drive context menu in Windows 10 to quickly remove temporary files. When performing daily tasks, your computer downloads, creates and uses temporary files to keep the system and apps running. Most of the time, Windows 10 gets rid of these files in due time. Still, sometimes temporary files get stuck and fill up your system drive. Thus, almost every Windows 10 user knows that it is necessary to perform regular disk cleanups.
There are several ways to run Disk Cleanup in Windows 10. In fact, there are currently two utilities to do that job. The old Disk Cleanup UI is now deprecated but still present in the system. The newer option is Storage Senses in Settings. Those who prefer classic interfaces to manage Windows may want to add Disk Cleanup to the drive context menu. That will help users to access the utility faster, with fewer clicks without opening the drive properties.
You need to apply a small registry tweak to perform this simple operation. It extends the default drive context menu with a new entry that launches the Disk Cleanup utility for the selected drive.
Add Disk Cleanup to the Drive Context menu
- Download this ZIP archive with registry files.
- Inside the file, you will find two registry files. Extract them to any preferable folder.
- Unblock the files if Windows does not allow extracting or launching them.
- Double-click the Add Cleanup to the context menu.reg
- Confirm the changes in Windows Registry. There is no need to restart Windows Explorer or the entire system.
Now you can right-click any drive in your system and select Disc Cleanup right from the context menu.
Remove Disk Cleanup from the Drive Context menu
You can remove Disk Cleanup from the Drive Context menu in a similar fashion, just with a different reg file. Find the files you have downloaded previously and double-click the Remove Cleanup from the context menu.reg file. Confirm changes in Windows Registry and you are done.
Bear in mind that Microsoft is no longer actively developing the classic Disk Cleanup utility, so you better learn how to use the new one in Windows Settings. Besides, unlike the new UI, the old Disk Cleanup cannot work with the Downloads folder to regularly delete unused files. It is still capable and supports cleanup presets, but all the most exciting features are now available in Windows Settings.
How it works
In one of our previous articles, we reviewed in detail how to add any Ribbon command to the Context menu in Windows 10. See
In short, all the Ribbon commands are stored under the following Registry key:
The easiest way to add a command from that listing to the context menu in File Explorer is to export the desired command and modify the exported *.Reg file. All you need to do is to change the destination key.
In our case, we need the command named "
The Registry file that adds the Disk Cleanup command will look as follows:
Windows Registry Editor Version 5.00
In the code above, I replaced the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell path with the actual path of the Drive object, which is HKEY_CLASSES_ROOT\Drive\shell so the commands appear in the drive context menu.
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options: