Category filter

Script to clear browser cache on Windows devices

A browser cache is a database of files that stores resources such as texts, images, and other media from websites. This reduces the time required to load previously visited websites by avoiding the need to download the same data from the internet. However, browsers may load the previous version of websites even if the website is updated due to the cache present on the device. Also, caches can accumulate over time and consume storage space on the device. Hence, enterprises may require to clear the browser’s cache from the devices to save space and load newly updated websites without any issues. You can remotely deploy scripts from the Hexnode portal to clear the browser’s cache from the Windows devices.


The sample scripts provided below are adapted from third-party Open-Source sites.

Clear cache on Google Chrome

Powershell Script

Provide the target username as an argument. If the cache has already been cleared, the error “Specified path doesn’t exist.” will be displayed.

Batch Script

Replace <Username> with the username of the user account from which the Google Chrome browser cache needs to be cleared. If the cache has already been cleared, executing the command may return an error.


  • Make sure the Google Chrome browser is closed before running the command.
  • It is recommended to manually validate the script execution on a system before executing the action in bulk.
  • Hexnode will not be responsible for any damage/loss to the system on the behavior of the script.

  • Sample Script Repository