System Enable or Disable Storage Sense Cleanup of Temporary Files in Windows 11


  • Staff
Storage_Sense_banner.png

This tutorial will show you how to enable or disable allow Storage Sense to cleanup temporary files for all users in Windows 10 and Windows 11.

Storage Sense can automatically free up drive space for you by getting rid of items that you don't need, like temporary files and items in your Recycle Bin.

Storage Sense is off by default. If your PC runs into low disk space and you have not interacted with Storage Sense in the past, Windows may turn on Storage Sense to manage select temporary files, then notify you. If you prefer, you can choose to turn Storage Sense off right away or after the low disk state is resolved.

If Storage Sense is turned on with the default settings, it will run when your device is low on disk space and will clean up unnecessary temporary files. Content from the Recycle Bin will be deleted by default after some time, but items in your Downloads folder and OneDrive (or any other cloud provider) will not be touched unless you set up Storage Sense to do so.

You can configure the Allow Storage Sense Temporary Files cleanup policy to enable or disable the Storage Sense "Cleanup of temporary files" setting for all users on the computer.

You must be signed in as an administrator to enable or disable Allow Storage Sense Temporary Files cleanup.

If the Allow Storage Sense policy has been disabled, it will override this Allow Storage Sense Temporary Files cleanup policy.



Contents

  • Option One: Enable or Disable Storage Sense Cleanup of Temporary Files in Local Group Policy Editor
  • Option Two: Enable or Disable Storage Sense Cleanup of Temporary Files using REG file


EXAMPLE: Storage Sense "Cleanup of temporary files" setting disabled

Storage_Sense_cleanup_of_temporary_files.png





Option One

Enable or Disable Storage Sense Cleanup of Temporary Files in Local Group Policy Editor


The Local Group Policy Editor is only available in the Windows 10/11 Pro, Enterprise, and Education editions.

All editions can use Option Two to configure this same policy using a REG file instead.


1 Open the Local Group Policy Editor (gpedit.msc).

2 Navigate to the policy location below in the left pane of Local Group Policy Editor. (see screenshot below)

Computer Configuration\Administrative Templates\System\Storage Sense

Storage_Sense_cleanup_of_temporary_files_gpedit-1.png

3 In the right pane of Storage Sense in Local Group Policy Editor, double click/tap on the Allow Storage Sense Temporary Files cleanup policy to edit it. (see screenshot above)

4 Do step 5 (enable) or step 6 (disable) below for what you want.

5 Enable Storage Sense Cleanup of Temporary Files

This is the default setting.


A) Select (dot) Not Configured, click/tap on OK, and go to step 7 below. (see screenshot below)​

Storage_Sense_cleanup_of_temporary_files_gpedit-2.png

6 Disable Storage Sense Cleanup of Temporary Files

A) Select (dot) Disabled, click/tap on OK, and go to step 7 below. (see screenshot below)​

Storage_Sense_cleanup_of_temporary_files_gpedit-32.png

7 When finished, you can close the Local Group Policy Editor if you like.




Option Two

Enable or Disable Storage Sense Cleanup of Temporary Files using REG file


1 Do step 2 (enable) or step 3 (disable) below for what you want.

2 Enable Storage Sense Cleanup of Temporary Files

This is the default setting.


A) Click/tap on the Download button below to download the REG file below, and go to step 4 below.​

Enable_Allow_Storage_Sense_temporary_files_cleanup.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\StorageSense]
"AllowStorageSenseTemporaryFilesCleanup"=-

3 Disable Storage Sense Cleanup of Temporary Files

A) Click/tap on the Download button below to download the file below, and go to step 4 below.​

Disable_Allow_Storage_Sense_temporary_files_cleanup.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\StorageSense]
"AllowStorageSenseTemporaryFilesCleanup"=dword:00000000

4 Save the .reg file to your desktop.

5 Double click/tap on the downloaded .reg file to merge it.

6 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.

7 If you like, you can now delete the downloaded .reg file.


That's it,
Shawn Brink


 

Attachments

  • Disable_Allow_Storage_Sense_temporary_files_cleanup.reg
    696 bytes · Views: 16
  • Enable_Allow_Storage_Sense_temporary_files_cleanup.reg
    670 bytes · Views: 20
Last edited:
Back
Top Bottom