Windows 10 automatically defrags the hard drive that Windows is installed on, but automated temporary file removal is not enabled by default. If your hard drive is low on disk space or you are syncing OneDrive or SharePoint Sites, temporary files will slowly degrade the performance of your hard drive if left unchecked. These files should regularly be removed to maintain optimal hard drive performance.
Turn on Storage Sense
Automate the removal of stale temporary, OneDrive, and SharePoint files from your computer by enabling Storage Sense. OneDrive and SharePoint will automatically download files that have been removed from your computer when you open them.
1. Select Start menu > Settings
2. Select System
3. Select Storage > Configure Storage Sense or run it now
3. Turn on Storage Sense
4. Check “Delete temporary files that my apps aren’t using”
5. Enabling delete of “Recycle Bin” and “Downloads” will remove the files permanently from your computer. These files can not be restored.
5. Select how long unused files from OneDrive and SharePoint remain on your computer.
Now that you have automated the removal of unnecessary files from your hard drive it is still important to monitor the amount of free disk space on your hard drive. Try to keep at least 20% of free disk space. Windows and applications need the extra space to store temporary files to run properly.