Before you start
- A Windows 11 or Windows 10 PC
Method 1 Clear temporary files in Settings (recommended)
Turn on Storage Sense on the same page to clean temporary files automatically.
-
Step 1: Open Storage
Go to Settings > System > Storage.
-
Step 2: Open Temporary files
Click Temporary files and wait while Windows calculates the sizes.
-
Step 3: Choose what to delete
Tick Temporary files, Thumbnails, Delivery Optimization Files, Windows Update Cleanup and Recycle Bin if you’re sure it’s empty of anything you need. Leave Downloads unticked unless you want that folder emptied.
-
Step 4: Remove files
Click Remove files.
Method 2 Empty the Temp folder
-
Step 1: Open %temp%
Press Win + R, type %temp% and press Enter.
-
Step 2: Select everything
Press Ctrl + A and then Delete.
-
Step 3: Skip files in use
If Windows says a file is in use, tick Do this for all current items and click Skip. Those belong to running programs.
Method 3 Clear other Windows caches
-
Step 1: DNS cache
Open Terminal and run ipconfig /flushdns.
-
Step 2: Microsoft Store cache
Press Win + R, type wsreset.exe and press Enter. A blank window opens, then the Store restarts with a clean cache.
-
Step 3: File Explorer history
In File Explorer, click ⋯ > Options and under Privacy click Clear.
-
Step 4: Location and activity history
In Settings > Privacy & security, review Location and Activity history to clear stored history.
ipconfig /flushdns
wsreset.exe
Should you clear the Prefetch folder?
C:\Windows\Prefetch stores small files that help programs start faster. Deleting them is safe but usually pointless: Windows recreates them, and apps start slightly slower until it does. Only clear Prefetch if you’re troubleshooting a specific startup problem. To do it, press Win + R, type prefetch, approve the admin prompt, and delete the contents (not the folder).
Troubleshooting
Temporary files won’t delete
Restart the PC and try again; some files are locked by running programs. Files that still won’t delete are in use by Windows and can be left.
Windows Update Cleanup takes forever
It can take 10–20 minutes on PCs with many old updates. Let it finish; the space is freed when done.
Frequently asked questions
Is it safe to delete everything in %temp%?
Yes. Programs recreate what they need. Files in use are skipped automatically.
Will clearing cache speed up my PC?
It frees space and can fix glitches, but it rarely makes a big speed difference unless your drive was almost full.
How do I clear RAM cache?
Restarting the PC clears memory. Windows manages RAM automatically; “RAM cleaner” apps aren’t needed.
Summary
Use Settings > System > Storage > Temporary files for the bulk of the cleanup, empty %temp%, and flush DNS or reset the Store cache when they cause problems. Leave Prefetch alone unless you’re troubleshooting.