Add Disk Cleanup to Drive Context Menu in Windows 10

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

  1. Download this ZIP archive with registry files.
  2. Inside the file, you will find two registry files. Extract them to any preferable folder.
  3. Unblock the files if Windows does not allow extracting or launching them.
  4. Double-click the Add Cleanup to the context menu.reg
  5. 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

How to add any Ribbon command to the right click menu in Windows 10

In short, all the Ribbon commands are stored under the following Registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell.

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 "Windows.CleanUp".

The Registry file that adds the Disk Cleanup command will look as follows:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Drive\shell\Windows.CleanUp]
"CommandStateSync"=""
"ExplorerCommandHandler"="{9cca66bb-9c78-4e59-a76f-a5e9990b8aa0}"
"Icon"="%SystemRoot%\\System32\\cleanmgr.exe,-104"
"ImpliedSelectionModel"=dword:00000001

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.

That's it.

Support us

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!

Author: Taras Buria

Taras is here to cover stories about Microsoft and everything around, although sometimes he prefers Apple.

2 thoughts on “Add Disk Cleanup to Drive Context Menu in Windows 10”

Leave a Reply

Your email address will not be published.

Exit mobile version
Using Telegram? Subscribe to the blog channel!
Hello. Add your message here.