How to Clear Temporary Files Automatically in Windows 10

Windows 10 got the ability to clear temporary files automatically in a recent build. Starting with build 15014, a new option appeared in Settings. Here is how you can use it.


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.Clear Temporary Files Automatically In Windows 10

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.Change How We Free Up Space

The related page will be opened:Change How We Free Up Space Page

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:

Empty Recycle Bin automatically in Windows 10

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.

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: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.

2 thoughts on “How to Clear Temporary Files Automatically in Windows 10”

Leave a Reply

Your email address will not be published.

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