Delete Cache Windows 11: A Complete Step-by-Step Guide
In this article
Deleting the cache in Windows 11 removes temporary files stored by the operating system and applications to speed up loading times. Over time, these files can become corrupted, outdated, or excessively large, leading to system slowdowns, software glitches, or a lack of available disk space. By clearing various cache locations—including the system temporary files, the DNS cache, and the Microsoft Store cache—you can refresh your system's performance and resolve specific application errors.
What You'll Need
- A computer running Windows 11.
- Administrator privileges (required to clear certain system-level caches).
- A few minutes of time to restart the computer for changes to take full effect.
Step-by-Step
1. Clearing System Temporary Files via Settings
The most comprehensive way to remove general system cache is through the built-in Storage settings.
- Click the Start button and select the Settings gear icon.
- Navigate to System in the left-hand sidebar, then click on Storage.
- Wait for Windows to calculate the storage usage, then click on Temporary files.
- Review the list of checkboxes. Ensure Temporary files, Thumbnails, and DirectX Shader Cache are selected. Be cautious with the Downloads folder; if you have files there you wish to keep, uncheck it.
- Click the Remove files button at the top of the list.
- Confirm the action by clicking Continue.
2. Manually Clearing the Temp Folder
Some stubborn temporary files are not always captured by the Settings menu. You can remove these manually using the Run command.
- Press Windows Key + R on your keyboard to open the Run dialog box.
- Type
%temp%into the text field and press Enter. This opens the local user temporary folder. - Press Ctrl + A to select all files and folders in the directory.
- Press the Delete key (or right-click and select the trash icon).
- If a window appears stating that a file is "in use" and cannot be deleted, check the box Do this for all current items and click Skip. This is normal, as some files are being used by active programs.
- Repeat the process: Press Windows Key + R, type
temp(without the percent signs), and delete the contents of that folder as well.
3. Flushing the DNS Cache
If you are experiencing internet connectivity issues or websites are not loading correctly, clearing the DNS (Domain Name System) cache can help.
- Click the Start button and type
cmd. - Right-click on Command Prompt and select Run as administrator.
- In the black window, type the following command exactly:
ipconfig /flushdns - Press Enter.
- You should see a message stating: "Successfully flushed the DNS Resolver Cache."
4. Resetting the Microsoft Store Cache
If the Microsoft Store is lagging, failing to download apps, or crashing, resetting its specific cache is the best solution.
- Press Windows Key + R to open the Run dialog.
- Type
wsreset.exeand press Enter. - A blank Command Prompt window will appear. Do not close it; it will run automatically for a few seconds.
- Once the process is complete, the Microsoft Store window will open automatically, indicating the cache has been cleared.
5. Clearing the Prefetch Cache
Prefetch files help Windows load applications faster, but if they become bloated, they can cause issues.
- Press Windows Key + R.
- Type
prefetchand press Enter. Click Continue if prompted for administrator permission. - Press Ctrl + A to select all files.
- Press Delete to remove them.
Common Mistakes
- Deleting the Downloads Folder: In the Storage settings menu, the "Downloads" checkbox is often checked by default. Many users accidentally delete their personal downloaded documents and installers. Always uncheck this if you have important files in that folder.
- Forcing Deletion of "In Use" Files: When clearing the %temp% folder, Windows will warn you that certain files cannot be deleted because they are open in another program. Trying to force-delete these using third-party software can cause active applications to crash. Always choose "Skip."
- Confusion between Temp and %temp%: Users often only clear one. The
tempfolder is the system-wide temporary directory, while%temp%is specific to the current user profile. Both should be cleared for a thorough clean.
Tips
- Enable Storage Sense: To avoid manual cleaning, go to Settings > System > Storage and toggle on Storage Sense. This allows Windows to automatically delete temporary files and empty the recycle bin on a schedule.
- Restart After Cleaning: After clearing the DNS cache or the Prefetch folder, restart your computer. This ensures that Windows regenerates only the necessary, clean cache files.
- Browser Cache: Remember that system cache is different from browser cache. To clear web data, you must go into the settings of your specific browser (Chrome, Edge, or Firefox) and clear the "Browsing data."
Troubleshooting
If you encounter issues while attempting to delete cache files, consider the following solutions:
- Permission Denied: If you cannot access the
prefetchortempfolders, ensure you are logged in as an Administrator. Right-click the application (like Command Prompt) and choose "Run as administrator." - Disk Space Not Increasing: If you delete files but the available space doesn't change, remember to empty your Recycle Bin. Files deleted from the Temp folders often move to the bin first rather than being permanently erased.
- System Slowness After Clearing: It is normal for some applications to open slightly slower the very first time you launch them after clearing the cache. This is because the system is rebuilding the necessary temporary files to optimize performance.
Frequently Asked Questions
Is it safe to delete all temporary files?
Yes, it is generally safe. Temporary files are designed to be transient. Windows will not allow you to delete files that are currently essential for the system to run.
Will deleting the cache delete my personal photos or documents?
No, as long as you do not manually select your personal folders or the "Downloads" folder in the Storage settings. Cache files are system-generated and separate from your personal data.
How often should I clear my Windows 11 cache?
There is no strict schedule, but doing so once every few months, or whenever you notice a significant drop in performance or encounter app errors, is a good practice.
What is the difference between Disk Cleanup and Storage Settings?
Disk Cleanup is the legacy tool from older versions of Windows. Storage Settings in Windows 11 is the modern replacement that offers more granular control and automation via Storage Sense.
Does flushing the DNS cache affect my internet speed?
It does not increase the raw speed of your connection, but it can fix "Page Not Found" errors or resolve issues where a website has moved to a new IP address but your computer is still trying to use the old one.