To clear temporary files automatically in Windows 10, you need to enable the new option. Open Settings and go to System -> Storage. There, you will find the option named "Storage Sense". Enable it and you are done.

But the built-in auto cleanup feature is new to Creators Update. Files stored in Recycle Bin for more than 30 days will be deleted for example as part of this cleanup.

The user can customize this behavior. To do this, click the link "Change how we free up space" under the switch.

The related page will be opened:

There, you'll see two options. One is Delete temporary files that my apps aren't using.

It is a good idea to keep this turned on. Temporary files are created by various Windows services, installed apps and tools. Temporary files can be safely deleted after the process which has created them has quit. However, this does not happen often, so the system temporary directory or the app's temp directory continues to store them and fills your disk drive with junk. When this option is enabled, Windows will delete them automatically and keep you drive clean besides saving your disk space.

If you do not have Windows 10 Creators Update installed yet, it is not a problem. Windows ships with a tool to clean up files called Disk Cleanup. It can be automated using Task Scheduler or by simply creating special shortcuts to cleanmgr.exe with various switches. We have covered this extensively at Winaero.

There are two ways to clean up your temp directory automatically, which can be used in previous releases of Windows 10 too. Check out these articles:

The other option is Delete files that have been in the recycle bin for over 30 days. As is obvious from its name, it will clear your Recycle Bin automatically, so deleted files won't grow in size. This is very useful.

If you are running a Windows 10 version without this feature, you still empty Recycle Bin automatically. The following article describes the process:

Using the instructions in that article, you will be able to create a Scheduled Task which calls a special PowerShell command to clean up the Recycle Bin. It is a nice alternative to this new feature.

The native ability to remove temporary files automatically is one of the best improvements to the built-in maintenance tools in Windows 10. Once you enable this feature, you can finally forget about the existence of the temp folder and its contents.

We hope Microsoft extends this to clean up Windows Update related files too in the future such as files superseded by newer versions and downloaded updates in the Software Distribution folder.

You are here: Home » Windows 10 » How to Clear Temporary Files Automatically in Windows 10

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:

Bitcoin: 18amKj99FCPUfnnpqZ6XCG2h3TGeUTCeY7

Connect with us

For your convenience, you can subscribe to Winaero on the following web sites and services.

About Sergey Tkachenko

Sergey Tkachenko is a software developer from Russia who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Facebook, Twitter or Google+.