User Agents

Web browsers and everyday web tech, explained

Clear Disk Cache: Step-by-Step Guide for PC and Mac

· 6 min read · Cookies and Cache

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Clearing your disk cache involves removing temporary files that your operating system and applications store on your hard drive to speed up future loading times. While caching is designed to improve performance, these files can become corrupted, outdated, or excessively large, leading to system sluggishness, software glitches, and a significant loss of available storage space. By purging these files, you force the system to fetch fresh data from the source, which often resolves application crashes and frees up gigabytes of disk space for more important files.

What You'll Need

  • A computer running Windows (10 or 11) or macOS.
  • Administrative privileges on the device to access system folders and run cleanup tools.
  • A few minutes of downtime, as some processes may require a system restart to fully clear the cache.
  • An optional external backup of critical data, although clearing cache files is generally a safe process that does not delete personal documents.

Step-by-Step

Clearing Disk Cache on Windows 10 and 11

  1. Use Disk Cleanup for System Files: Click the Start button and type "Disk Cleanup" into the search bar. Right-click the application and select "Run as administrator" to ensure you can clear system-level caches. Select the drive you wish to clean (usually C:) and click OK. In the list of files to delete, check the boxes for "Temporary files," "Thumbnails," "DirectX Shader Cache," and "Delivery Optimization Files." Click OK and then "Delete Files" to confirm.
  2. Purge the Temporary Folder manually: Press the Windows Key + R on your keyboard to open the Run dialog box. Type %temp% and press Enter. This opens the folder where applications store their temporary session data. Press Ctrl + A to select all files and folders, then press the Delete key. If a window pops up stating that a file is currently in use, check the box "Do this for all current items" and click "Skip."
  3. Clear the Windows Store Cache: Press Windows Key + R again. Type wsreset.exe and press Enter. A blank Command Prompt window will appear. Do not close it; wait for the window to close automatically and for the Microsoft Store to open, which indicates the cache has been successfully reset.
  4. Flush the DNS Cache: To clear the network-related disk cache, right-click the Start button and select "Terminal (Admin)" or "Command Prompt (Admin)." Type ipconfig /flushdns and press Enter. You should see a confirmation message stating that the DNS Resolver Cache was successfully flushed.

Clearing Disk Cache on macOS

  1. Clear User Caches: Open Finder and click "Go" in the top menu bar. Select "Go to Folder..." and type ~/Library/Caches. This folder contains the cache for most of your user-installed applications. Select the folders of the apps you wish to clear, or press Cmd + A to select everything, and move them to the Trash.
  2. Clear System and Kernel Caches: To clear deeper system caches, you must boot into Safe Mode. Shut down your Mac. For Intel Macs, turn it on and immediately press and hold the Shift key until the login window appears. For Apple Silicon (M1/M2/M3) Macs, hold the power button until "Loading startup options" appears, select your disk, hold Shift, and click "Continue in Safe Mode." Once logged in, restart the computer normally; macOS automatically performs a cache cleanup during the Safe Mode boot process.
  3. Clear Browser Caches (Safari): Open Safari and go to "Settings" (or Preferences). Click the "Advanced" tab and check the box "Show Develop menu in menu bar." Now, click the "Develop" menu in the top bar and select "Empty Caches."
  4. Empty the Trash: None of the disk space is actually reclaimed until the files are permanently deleted. Right-click the Trash icon in your dock and select "Empty Trash."

Common Mistakes

One of the most frequent errors is deleting the entire Library or System32 folder instead of specifically targeting the Caches or Temp subfolders. Deleting root system files can render your operating system unbootable. Always ensure you are inside the specific cache directory before selecting all files.

Another mistake is using third-party "PC Cleaner" or "Mac Optimizer" software without researching the tool first. Many of these programs use aggressive tactics to delete files that aren't actually caches, or they install bloatware that consumes more resources than the cache they cleared. Stick to built-in system tools whenever possible.

Users often forget to restart their computers after a deep cache purge. While not always strictly necessary, a restart clears the RAM and ensures that the system initializes new cache files correctly rather than trying to reference pointers to files that no longer exist on the disk.

Tips

To keep your disk cache from bloating in the first place, enable "Storage Sense" on Windows. Go to Settings > System > Storage and toggle Storage Sense to "On." This allows Windows to automatically delete temporary files that your apps aren't using and empty your recycle bin on a schedule.

For Mac users, consider creating a folder alias to ~/Library/Caches on your desktop. This allows you to quickly access the cache folder and clear it manually every few months without having to navigate through hidden system directories.

If you are clearing the cache because a specific website or app is acting up, try clearing the cache for that specific application first rather than doing a full system purge. This saves time and prevents you from having to re-download data for every other app on your machine.

Troubleshooting

Files Refuse to Delete: If you encounter an error saying a file cannot be deleted because it is "open in another program," it means the application associated with that cache is still running in the background. Open the Task Manager (Windows) or Activity Monitor (Mac), find the process, force quit it, and then try deleting the file again.

System Slowdown After Clearing: It is normal for your computer to feel slightly slower immediately after clearing the disk cache. This is because the system must now rebuild those caches from scratch. For example, thumbnails for your photos will take a moment to reappear, and websites may load slightly slower on the first visit. This performance dip is temporary.

Application Errors: In rare cases, clearing a cache can cause an application to lose a specific setting or fail to launch. If this happens, simply relaunch the application. If the problem persists, you may need to reinstall the specific app to regenerate the necessary configuration files that were mistakenly flagged as temporary cache.

Frequently Asked Questions

Will clearing my disk cache delete my personal photos or documents?

No. Disk caches consist of temporary files, such as web page snippets, thumbnail previews, and temporary installation files. Your personal documents, photos, and videos are stored in separate user directories and are not touched by cache-clearing processes.

How often should I clear my disk cache?

For most users, every three to six months is sufficient. However, if you are a developer, a graphic designer working with large assets, or someone who installs and uninstalls software frequently, you may want to do this monthly to maintain optimal disk space.

Does clearing the cache improve internet speed?

It does not increase your actual bandwidth or connection speed, but it can make your browsing experience feel faster if the previous cache was corrupted or bloated. It also ensures you are seeing the most recent version of a website rather than an old, cached version.

Is it safe to delete everything in the %temp% folder?

Yes, it is generally safe. Any file that is critical to a currently running process will be locked by the system and cannot be deleted anyway. The files that are allowed to be deleted are, by definition, no longer needed by the system.

What is the difference between a browser cache and a disk cache?

A browser cache is a specific type of disk cache that only stores data from websites (like images and CSS). A general disk cache includes system-level files, application temporary data, and OS-level indices that affect the entire computer, not just the web browser.