Overview
Temporary files are created by Windows and apps for short-term use, but they accumulate and can take up gigabytes of disk space. Clearing them is safe and frees space. This guide shows every way to delete temporary files on Windows 11 and 10, plus how to automate the cleanup.
Clearing temporary files frees disk space and keeps Windows tidy.
Key Takeaways
- Temporary files are safe to delete; Windows recreates any it still needs.
- Settings > Storage and Disk Cleanup are the easiest methods.
- Storage Sense can delete temp files automatically on a schedule.
- The %Temp% folder holds user temp files; C:\Windows\Temp holds system ones.
Temp vs %Temp% Folders
- %Temp% — your user’s temporary folder (C:\Users\You\AppData\Local\Temp).
- C:\Windows\Temp — the system-wide temporary folder.
- Both can be cleared; files in use will simply be skipped.
Method 1 — Windows Settings
1. Open Settings > System > Storage.
2. Click Temporary files.
3. Tick the categories to remove (Temporary files, Delivery Optimization, Recycle Bin, etc.).
4. Click Remove files.
Method 2 — Storage Sense (Automatic)
1. Open Settings > System > Storage.
2. Turn on Storage Sense.
3. Click it to configure how often it runs and when to delete temp files and empty the Recycle Bin.
Method 3 — Disk Cleanup
1. Press Windows key + R, type cleanmgr, and press Enter.
2. Select the C: drive and click OK.
3. Tick Temporary files and other categories, then click OK > Delete Files.
4. Click "Clean up system files" to remove update and system temp data too.
Method 4 — Command Prompt
1. Open Command Prompt as administrator.
2. Clear user temp files: del /q/f/s %temp%\*
3. Clear system temp files: del /q/f/s C:\Windows\Temp\*
4. Files currently in use are skipped automatically.
Method 5 — File Explorer (Manual)
1. Press Windows key + R, type %temp%, and press Enter.
2. Select all (Ctrl + A) and delete; skip any files that are in use.
3. Repeat for C:\Windows\Temp.
4. Empty the Recycle Bin afterward.
Tip: Storage Sense is the best “set and forget” option — enable it so temp files are cleared automatically.
Troubleshooting
Problem: Some files will not delete ("in use").
Solution: They are being used by a running app. Skip them, or close the app/restart and try again.
Problem: Disk space barely changed.
Solution: Use Disk Cleanup’s "Clean up system files" to remove larger items like Windows Update cache and previous installations.
Problem: Temp files fill up again quickly.
Solution: Enable Storage Sense to clear them automatically, and check for an app that writes excessive temp data.
Problem: You deleted temp files but an app misbehaves.
Solution: Restart the app or PC; Windows and apps recreate any temp files they need.
Conclusion
Clearing temporary files is a safe, effective way to reclaim disk space. Use Settings or Disk Cleanup for a quick clean, the command line for speed, and Storage Sense to keep it automatic.
</w:pBdr><w:spacing w:before="220" w:after="40"/></w:pPr><w:r><w:rPr><w:b/><w:bCs/><w:color w:val="0B5394"/><w:sz w:val="21"/><w:szCs w:val="21"/><w:rFonts w:ascii="Calibri" w:cs="Calibri" w:eastAsia="Calibri" w:hAnsi="Calibri"/></w:rPr><w:t xml:space="preserve">About TechHub
This guide is part of the TechHub Knowledge Base. For more step-by-step IT guides and support, visit techhub.com.lk.















