Current version: 2.4
- PowerShell 5.1 or later
- Administrator privileges
PSWindowsUpdate
module (automatically installed by the script if not present)winget
package manager (optional, for application updates)
- Run PowerShell with administrator privileges.
- Execute the script.
.\PSCacheCleaner.ps1
- Installation of PSWindowsUpdate module if not already installed.
- Optimization and defragmentation of the C drive.
- Cleaning of various directories including Temp, Prefetch, SoftwareDistribution, browser caches, and more.
- Cleaning event viewer logs.
- Running Disk Cleanup tool.
- Clearing Microsoft Store cache.
- Flushing DNS cache.
- Updating Microsoft Store apps.
- Emptying Recycle Bin.
- Updating installed applications using Winget.
- Updating Windows Update.
- Ensure PowerShell is run with administrator privileges to perform certain tasks.
- Some cleaning operations may require confirmation or take some time to execute.
- This program may affect the system to a certain extent since by deleting cache data the applications may take longer to run or certain errors may occur. In case of any error due to deleting cache, notify in issues.
This script was authored by Ikkxeer
For any inquiries or issues, please contact @ikkxeer
Contributions to enhance the script or address issues are welcome. Please open a GitHub issue or submit a pull request.