Set When Storage Sense Should Automatically Empty Recycle Bin

As you may already know, Windows 10 includes the ability to automatically delete files in your Recycle bin, delete temporary files, and files in the Downloads folder to free up disk space. Starting with Windows 10 version 1809, the ability to automatically remove the contents of the  Recycle bin is added to Storage Sense. In recent Windows 10 builds, you can configure Storage Sense to automatically empty the Recycle Bin if files in that folder have been stored there for more that the specific number of days. Here is how.

Storage Sense is a nice, modern addition to Disk Cleanup. It allows you to maintain certain folders by preventing them from getting too large and clean them up automatically. The Storage Sense feature can be found in Settings, under System -> Storage.

Storage Sense can be used to remove Windows upgrade log files, system-created Windows Error Reporting Files, Windows Defender Antivirus temporary files, Thumbnails, Temporary Internet Files, Device driver packages, DirectX Shader Cache, Downloaded Program Files,  Delivery Optimization Files, old System log files, System error memory dump files and minidumps, temporary Windows update files, and more.

You can set Storage Sense to automatically delete files in the Recycle Bin. Let's see how it can be done.

Set When Storage Sense Should Automatically Empty Recycle Bin

  1. Open Settings.
  2. Go to System - Storage.
  3. Turn on the Storage sense option on the right.Windows 10 Storage Sense Enabled
  4. On the right, click on the Configure Storage Sense or run it now link.
  5. On the next page, navigate to the Temporary files section.
  6. Select the option Never (default), 1 day, 14 days, 30 days, or 60 days from the drop-down list under Delete files in my recycle bin if they have been there for over.Storage Days Recycle Bin

You are done.

The same option can be set with a Registry Tweak.

A Registry Tweak

  1. Open the Registry Editor app.
  2. Go to the following Registry key.
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy

    See how to go to a Registry key with one click.

  3. On the right, modify or create a new 32-Bit DWORD value named 08. Set it to 1 to enable the automatic cleanup feature for the Recycle Bin. A value data of 0 should be used to disable it.
    Note: Even if you are running 64-bit Windows you must still create a 32-bit DWORD value.
  4. Now, modify or create a new 32-Bit DWORD value named 256. Set it to 1, 14, 30 or 60 in decimal for the desired number of days. Storage Sense Days Recycle Bin Tweak
  5. To make the changes done by the Registry tweak take effect, you need to sign out and sign in to your user account.

Finally, you can force set the specific number of days with Group Policy. It is possible starting in Windows 10 build 18282.

Using Group Policy

If you are running Windows 10 Pro, Enterprise, or Education edition, you can use the Local Group Policy Editor app to configure the options mentioned above with a GUI.

  1. Press Win + R keys together on your keyboard and type:
    gpedit.msc

    Press Enter. Windows 10 run gpedit

  2. Group Policy Editor will open. Go to Computer Configuration\Administrative Templates\System\Storage Sense.
  3. Enable the policy option Configure Storage Recycle Bin cleanup threshold.
  4. Set the desired number of days in the Options: box. Enter a number between 0 to 365 for the number of days you want. It will be set for all users of your computer.Storage Sense Days Recycle Bin GP

If your Windows 10 edition doesn't include the Local Group Policy Editor app (gpedit.msc), you can apply a Registry tweak. It works in all editions of the OS.

Apply a Registry tweak

  1. Open the Registry Editor app.
  2. Go to the following Registry key.
    HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\StorageSense

    See how to go to a Registry key with one click.

  3. On the right, modify or create a new 32-Bit DWORD value ConfigStorageSenseRecycleBinCleanupThreshold.
    Note: Even if you are running 64-bit Windows you must still create a 32-bit DWORD value.
  4. Set its value to a number between 0 and 365 in decimal for how many days you want.
  5. Restart Windows 10.

To undo the change, delete the ConfigStorageSenseRecycleBinCleanupThreshold value and restart the OS.

That's it.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.