What clearing cache does and why you might want to
Your Windows 10 computer stores temporary files in several places — your browser cache, the Windows temporary folder, and the DNS cache that speeds up website lookups. Over time these files pile up and can use several gigabytes of disk space. Clearing them frees that space and can sometimes fix problems where Windows or your browser behaves oddly because old cached data is out of date.
You do not need to clear cache constantly. Most people benefit from doing it once every few months, or when they notice their drive is running low on space. Clearing cache will not speed up a slow computer unless your drive is nearly full — the real benefit is reclaiming wasted storage.
There are three main caches worth clearing: your browser cache (Chrome, Firefox, Edge, or whatever you use), the Windows temporary files folder, and the DNS cache that your system maintains. Each one takes a different approach.
Key Takeaways
- Browser cache lives inside your browser settings and is the easiest to clear — open your browser, press Ctrl+Shift+Delete, and choose the time range and file types you want removed.
- Windows temporary files sit in C:\Windows\Temp and C:\Users\[YourUsername]\AppData\Local\Temp, and you can delete them through File Explorer or the Disk Cleanup tool.
- The DNS cache is a small system file that you can flush using the Command Prompt with the command ipconfig /flushdns, which requires administrator access.
- You can automate cache clearing by running Disk Cleanup on a schedule, or by setting your browser to clear cache every time you close it.
Clearing your browser cache in Chrome, Firefox, and Edge
Every browser stores a cache of web pages, images, and files you have visited. To clear it, open your browser and press Ctrl+Shift+Delete on your keyboard. This opens the cache-clearing menu in Chrome, Firefox, and Edge.
In the window that appears, you will see a dropdown menu labeled "Time range" or "Clearing this will delete". Choose how far back you want to go — "All time" clears everything, while "Last hour" or "Last day" clears only recent files. Below that, check the boxes for "Cookies and other site data" and "Cached images and files". Leave "Passwords" unchecked unless you want to forget saved passwords. Then click the button to clear (it says "Clear data" in Chrome and Edge, "Clear" in Firefox).
If you want your browser to clear cache automatically every time you close it, you can set that up in browser settings. In Chrome, go to Settings > Privacy and security > Clear browsing data > On exit, then toggle on "Cookies and other site data" and "Cached images and files". Firefox and Edge have the same option under their privacy settings.
Removing Windows temporary files through Disk Cleanup
Windows stores temporary files in two folders: C:\Windows\Temp and C:\Users\[YourUsername]\AppData\Local\Temp. The easiest way to clear these is through the Disk Cleanup tool, which Windows provides built-in.
Open the Start menu and type "Disk Cleanup" and press Enter. A window will appear asking which drive you want to clean — select your C: drive (or whichever drive Windows is installed on). The tool will scan for temporary files and show you a list. Check the boxes next to "Temporary files", "Recycle Bin", and "Temporary internet files" (if you have not already cleared your browser cache). Uncheck anything you are unsure about. Then click "Delete Files" and confirm.
If Disk Cleanup does not show much to delete, you can also delete the temp folders manually. Open File Explorer and paste C:\Windows\Temp into the address bar at the top. Select all files (Ctrl+A) and press Delete. Repeat for C:\Users\[YourUsername]\AppData\Local\Temp, replacing [YourUsername] with your actual Windows username. Some files may be in use and will not delete — that is normal, just skip those.
Flushing the DNS cache from Command Prompt
Your computer maintains a DNS cache — a list of website addresses and their IP numbers that speeds up lookups. This cache is usually small, but clearing it can fix problems where a website has moved to a new server and your computer is still trying to reach the old address.
To flush the DNS cache, open the Start menu and type "Command Prompt". Right-click on "Command Prompt" and choose "Run as administrator" — this is important, as the command will not work without administrator access. In the black window that opens, type ipconfig /flushdns and press Enter. You should see a message saying "Successfully flushed the DNS Resolver Cache". Close the window.
You do not need to do this often. It is mainly useful if you have just changed your internet provider, moved a website to a new server, or are having trouble reaching a specific site that you know is working for other people.
Using Storage Sense for automatic cache clearing
Windows 10 includes a tool called Storage Sense that can automatically delete temporary files on a schedule. Open the Start menu and type "Storage settings" and press Enter. Click "Storage Sense" on the left side. Toggle on "Storage Sense" at the top, then choose how often you want it to run — "Every day", "Every week", or "Every month".
Below that, you can choose what Storage Sense deletes. Check "Temporary files" and "Recycle Bin". Leave other options unchecked unless you understand what they do. Storage Sense will now run on the schedule you chose and delete old temporary files without you having to do anything.
Storage Sense is useful if you want cache clearing to happen automatically, but it only deletes files that have not been used in a while — it will not immediately free up space the way manual clearing does.
What not to delete when clearing cache
When you are clearing temporary files, avoid deleting anything in C:\Program Files or C:\Program Files (x86) — these folders contain your installed programs and deleting from them can break software. Also do not delete anything in C:\Windows\System32 unless you are following specific instructions from Microsoft or a trusted source.
If you are manually deleting files from the Temp folders and Windows tells you a file is in use, leave it alone. Files that are currently open cannot be deleted, and forcing the issue can cause problems. Just skip those files and delete the others.
Your browser cache is safe to delete entirely — the worst that happens is websites load slightly slower the first time you visit them after clearing, because the browser has to download the files again. Cookies are different from cache; if you delete cookies, you will be logged out of websites and they will forget your preferences, so only delete cookies if that is what you intend.
Frequently Asked Questions
Will clearing cache make my computer faster?
Only if your drive is nearly full. Cache files do not slow down your computer while they sit there — they just waste storage space. If your drive has plenty of free space, clearing cache will not make Windows or programs run faster. If your drive is 90 percent full or more, clearing cache can help because Windows needs free space to operate smoothly.
Is it safe to delete everything in the Temp folder?
Mostly yes, but some files may be in use by running programs. Windows will not let you delete files that are currently open, so you may see error messages for a few files — that is normal. Just skip those and delete the rest. If you want to be extra safe, restart your computer first, which closes most programs and frees up their temporary files.
What is the difference between cache and cookies?
Cache stores copies of web pages, images, and files so they load faster next time. Cookies store information about you — login details, preferences, tracking data. Clearing cache just makes websites load slower temporarily. Clearing cookies logs you out of websites and makes them forget your settings. You can clear one without clearing the other in your browser settings.
Do I need to clear DNS cache regularly?
No. DNS cache is usually only a few megabytes and does not cause problems. Clear it only if you are having trouble reaching a specific website, or if you have just switched internet providers or moved a website to a new server. For most people, clearing DNS cache once or twice a year is plenty.
Can I schedule cache clearing to happen automatically?
Yes. Storage Sense can delete temporary files on a schedule, and your browser can clear cache every time you close it. Both are set up in their respective settings — Storage Sense in Windows Settings under Storage, and browser cache clearing in your browser's privacy settings under "Clear browsing data on exit".