How to clear your computer's cache in Windows 10 and 11

Updated: 03/10/2024 by Computer Hope
Microsoft Windows logo.

Cache memory is beneficial for many reasons. It stores data so you don't have to enter it again, remembers your preferences, and helps the software and websites you use frequently load faster. However, this memory can also get corrupted, causing problems or taking up an undesirable amount of storage.

Like your Internet browser, clearing the cache in Windows is a great step for troubleshooting issues and recovering drive space. The following sections contain steps to clear the cache in various areas of Windows 10 and Windows 11.

Tip

To clear the cache in your Internet browser, see: How to clear browser cache and cookies.

Clear temporary files in System Settings

Clearing out the temporary files in Windows can free up a significant amount of space. Select your version of Windows in the list below and follow the steps.

Windows 11

  1. Press the Windows key, type Settings, then press Enter. Or, press the keyboard shortcut Windows key+I.
  2. In the Settings window, click System in the navigation menu on the left.

Windows 11 System selector.

  1. On the right side of the screen, scroll down and click the Storage option.

Storage option in Windows 11 system settings.

  1. In Storage settings, scroll down and click the Storage Sense option.

Storage Sense option in Windows 11 storage settings.

  1. In the Storage Sense settings window, click the Automatic User content cleanup toggle to the On position.

Enable auto-clean option in Windows 11 Storage Sense settings.

  1. Scroll to the bottom of the Storage Sense settings window and click the Run Storage Sense now button.

Run Storage Sense now button in Windows 11 Storage Sense settings.

Windows 10

  1. Press the Windows key, type Settings, then press Enter. Or, press the keyboard shortcut Windows key+I.
  2. In the Settings window, click System.

Windows 10 System selector.

  1. On the left side of the screen, click the Storage option.

Storage selector in Windows 10.

  1. On the right side of the window, click Configure Storage Sense or run it now.

Configure Storage Sense or run it now link.

  1. In the Settings window, scroll to the bottom. Make sure the box next to Delete temporary files that my apps aren't using is checked (A), and then click the Clean now button (B).

Clear temporary storage.

Clear cache using Disk Cleanup

The Disk Cleanup utility in Windows 10 can be utilized to free up a significant amount of space. Here's how to use it.

  1. Press the Windows key, type Disk Cleanup, and press Enter. Or, press Windows key+R, type cleanmgr, and press Enter.
  2. Select a drive and click the OK button.

Disk Cleanup drive selector

  1. In the Disk Cleanup window, check the box next to the temporary file entries and any other entries you want to clean up, and click the OK button.

Disk Cleanup selections

  1. When prompted, click the Delete Files button.

Delete Files button

Clear Microsoft Store cache

If you encounter errors with the Microsoft Store or its apps, clearing its cache helps. The following steps show you how.

  1. Press the Windows key+R to open the Run box.
  2. Type wsreset.exe in the text field, then press Enter.

Windows Store Cache reset command.

  1. A black window should appear temporarily and then close itself. When it closes, the Microsoft Store cache is cleared.

Clear DNS cache

Clearing the DNS (Domain Name System) cache helps ensure that web pages and online applications continue to load properly. The following steps show you how.

  1. Press the Windows key and type Command Prompt (A).
  2. In the search results, use the arrow keys to highlight the Command Prompt program (B).
  3. On the right side of the screen, click Run as administrator (C).

Accessing an elevated Command Prompt.

Tip

You can also right-click the Command Prompt entry in the search results and select Run as administrator in the pop-up menu. Alternatively, press Windows key+R, type cmd, and press Ctrl+Shift+Enter to run as administrator.

  1. Click the Yes button on the prompt.
  2. When the Command Prompt opens, type ipconfig /flushdns, and then press Enter.

Flush DNS command.

  1. If you entered the command correctly, a message that says Successfully flushed the DNS Resolver Cache is displayed.