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


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

Last edited:
Because they are in the same menu, I am wondering if it's possible to combine the two registry fixes, if the other even is possible, disable Storage Sense and disable Drive Optimization?
 

My Computer

System One

  • OS
    Windows
    CPU
    Intel 8086k
    Motherboard
    Asus z370-F
    Graphics Card(s)
    EVGA 3080 Ti FTW3 Ultra
    Sound Card
    ADI-2 DAC fs
Because they are in the same menu, I am wondering if it's possible to combine the two registry fixes, if the other even is possible, disable Storage Sense and disable Drive Optimization?

Hello, :alien:

Yes, you could combine the two into one REG file like below if wanted.

Code:
Windows Registry Editor Version 5.00

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

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

Disable Storage Sense bit for REG above from below for reference:

 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Google Chrome
    Antivirus
    Microsoft Defender and Malwarebytes Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    CyberPower CP1500PFCLCD
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Surface Laptop 7 Copilot+ PC
    CPU
    Snapdragon X Elite (12 core) 3.42 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Monitor(s) Displays
    15" HDR
    Screen Resolution
    2496 x 1664
    Hard Drives
    1 TB SSD
    Internet Speed
    Wi-Fi 7 and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender
Back
Top Bottom