Skip to content
Windows

How to Clear Cache in Windows PC

Windows stores temporary files in several caches. The safest way to clear most of them is Settings > System > Storage > Temporary files. You can also empty the Temp folder, flush DNS, reset the Microsoft Store cache and clear your browser. Prefetch rarely needs clearing.

Updated
Time
10 minutes
Difficulty
Easy
Applies to
Windows

By Published Oct 6, 2026

Quick answer

  1. 1 Open Settings > System > Storage > Temporary files.
  2. 2 Tick Temporary files (and others you don’t need) and click Remove files.
  3. 3 Press Win + R, type %temp%, press Enter and delete everything you can.
  4. 4 Flush DNS with ipconfig /flushdns, and clear your browser cache.
On this page
  1. Before you start
  2. Clear temporary files in Settings (recommended)
  3. Empty the Temp folder
  4. Clear other Windows caches
  5. Should you clear the Prefetch folder?
  6. Troubleshooting
  7. Frequently asked questions

Before you start

  • A Windows 11 or Windows 10 PC

Turn on Storage Sense on the same page to clean temporary files automatically.

Method 2 Empty the Temp folder

  1. Step 1: Open %temp%

    Press Win + R, type %temp% and press Enter.

  2. Step 2: Select everything

    Press Ctrl + A and then Delete.

  3. 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

  1. Step 1: DNS cache

    Open Terminal and run ipconfig /flushdns.

  2. 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.

  3. Step 3: File Explorer history

    In File Explorer, click ⋯ > Options and under Privacy click Clear.

  4. Step 4: Location and activity history

    In Settings > Privacy & security, review Location and Activity history to clear stored history.

Commands for the DNS and Store caches
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.

Sources

Written by

James Chambo

Founder

James is the Founder and Senior Editor of OnlineHow with more than 20 years of experience in internet publishing.