Accumulation of Cache files with time can cause the Windows 11 or 10 systems to slow down and also consume costly storage space, especially if you are using M.2 drives. Therefore, clearing Cache files perhaps improves the system’s efficiency if done often, and with that many times small problems could also be solved. Now, coming to the main topic of this article is “how we can use the command prompt in Windows 11 or 10 to delete cache files quickly“; so, let’s see the steps we can follow to achieve this.
What is the role of Cache files?
The cache files on our system whether it is a PC or smartphone, the role of them is to store the data temporarily that accessed repeatedly by the user so that the app or system can perform better and serve the required data quickly. For example, a browser stores a cache of websites we visit often so that it can load them quickly.
Steps to clear different Cache on Windows using CMD
There are multiple types of cache files generated by different applications on our Windows system. Here we show the commands to clear the most common cache files such as the ones created by applications, DNS cache, Microsoft Windows store cache, and Thumbnail Cache.
Open Command Prompt as Administrator
The first step is ofcourse we need to access the command line interface and that can be done by using the CMD. To open that, click on the Windows Start button and then search for “Command Prompt“, as it appears click on “Run as Administrator“.
1: Clear DNS Cache
DNS cache’s main task like any other cache file is to speed up the process, but instead of Windows system, DNS cache helps in loading websites fast by storing the address of websites to improve our browsing experience. But sometimes this great feature can also cause issues if the information it has cached becomes corrupted or outdated. Let’s take an example, what if a website’s IP address has been changed but still not updated in the DNS cache and it keeps using the old IP address to resolve the website?
In such as scenario, the browser would through an error. But such meager problems can be resolved by just clearing the DNS cache on Windows, Here is the command that, we can use in our command prompt to clear the Windows DNS cache.
ipconfig /flushdns
Type the above command and hit the Enter key, in return, it will give a message- “Windows IP Configuration Successfully flushed the DNS Resolver Cache.”
2: Clear Windows System Cache
We can use the inbuilt Disk Cleanup utility of Windows to clear the System cache via GUI, however, this can be possible with CMD as well, a single command will invoke the Disk Cleanup utility which will also clear the system cache, here is the command to follow.
In the command prompt, execute the given command that will in return run the Disk cleanup with a predefined set of options instructed in the command using the flag 1.
cleanmgr /sagerun:1
3: Reset Windows Microsoft Store to clear its Cache
Windows 10 and 11 come with an application store to install various popular software programs, it is known as the Microsoft Store. Many times common issues such as being stuck while updating apps through the store or apps not downloading or installing properly on Windows, can be resolved by cleaning the Microsoft Store cache.
In your command prompt type “WSReset.exe” and hit the Enter key to clear the Microsoft Store cache. The command will reset the Windows apps store without deleting any already installed applications or changing any user settings.
WSReset.exe
4: Clear Temporary Files
To store the information temporarily for performing various actions properly on the system: running programs, file transfer, or the system itself creates temporary files. Although, most of the time these files get deleted automatically, however, if you need to do that manually then for that the command is given below:
Type the following command to delete all files in your Windows TEMP folder:
del /q/f/s %TEMP%\*
5. Clearing Thumbnail Cache
On Windows, the Thumbnail Cache is generated by the system which helps in loading the images and icons faster. For example, when we open a folder with hundreds of images, it will take a few seconds to show their Thumbnails, however, once the system creates the cache for the images, the next time it will quickly load the Thumbnails, and eventually, this will increase the performance and also speed up the process. However, if for some reason the Thumbnail cache is corrupted then here is the command to delete it, so that our system can generate the same again.
First, stop the Windows Explorer process by typing:
taskkill /f /im explorer.exe
Runt the command to clear all Thumbnail cache:
del /f /s /q %LocalAppData%\Microsoft\Windows\Explorer\thumbcache_*.db
Restart the Explorer again using the command:
start explorer.exe
Conclusion
We have listed a few commands that are easy to remember and also help in quickly removing unwanted cache files to resolve various system issues along with freeing up disk space. Apart from that, removing cache files from time to time ensures our system’s smooth performance.
FAQs
Q: Is there any chance that clearing the Windows cache deletes personal files or settings?
A: No, clearing the Windows cache will not affect the user’s settings or files. It will only delete the temporary files that are not essential in the working or operations of the system.
Q: When and how many times a user should clear Cache files?
A: There is no specific time but if you install and uninstall programs often or perform internet browsing a lot then it is a good idea to clear the Cache at least once in a month.
Q: Will deleting the DNS cache increase the internet or web browsing speed?
A: No, clearing the DNS cache could solve some internet connectivity issues if there is a problem in Domain name resolution however, will not directly impact or increase the internet speed.
Great tutorial! I never knew how to clear the cache in Windows 11/10 using the Command Prompt. Thanks for sharing this useful information. I’ll definitely try it out.