Skip to content

PatrickJnr/Shader-Cache-Remover

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Shader Cache Remover

Overview

Shader Cache Remover is a powerful and user-friendly desktop application designed to clean up shader cache files from your system. Shader cache files are temporary files generated by graphics drivers (NVIDIA, AMD, Intel) and game engines (Unreal, Unity) to improve performance. Over time, these caches can become bloated, outdated, or corrupted, leading to wasted disk space and potential performance issues. This tool provides a safe and easy way to clear them out.

The application is built with Python and Tkinter and features a modern, dark-themed interface inspired by Catppuccin.

Image

image

Key Features

  • Modern GUI: An intuitive and visually appealing graphical user interface with a dark theme.
  • One-Click Cleanup: Safely delete shader cache files with a single click.
  • Dry Run Mode: Simulate a cleanup to see which files and directories would be removed without actually deleting anything.
  • Backup System: Automatically or manually back up shader caches to a location of your choice before deletion for easy recovery.
  • Real-time Progress: A live progress bar and status updates keep you informed during the cleanup process.
  • Detailed Statistics: Get real-time stats on files and directories deleted, total space freed, and any errors encountered.
  • Comprehensive Scanning: The tool automatically detects known cache locations for:
    • NVIDIA (DXCache, GLCache, NV_Cache)
    • AMD (DxCache, GLCache)
    • Intel
    • Steam
    • Unreal Engine
    • Unity
    • And other common Windows cache locations.
  • Custom Path Support: Easily add your own custom directories to be included in the cleanup scan via the Settings menu.
  • Advanced Settings: Configure auto-backups, detailed logging, and manage custom paths. All settings are saved automatically.
  • Enhanced Logging: A detailed log panel shows every action the application takes, with color-coded log levels for clarity.
  • Stop Functionality: Safely cancel an ongoing cleanup operation at any time.

How to Use

1. Prerequisites

  • Python 3: Make sure you have Python 3 installed on your system. You can download it from python.org.
  • Tkinter: The script uses Tkinter for the graphical interface, which is included with most Python installations. If it is not installed, you can typically install it using your system's package manager.

2. Download the Script

  • Option A: Clone the repository Open a terminal or command prompt and run the following command: git clone https://github.com/PatrickJnr/Shader-Cache-Remover.git

  • Option B: Download the ZIP file Go to the main page of the repository and download the source code as a ZIP file. Extract it to your desired location.

3. Run the Application

  1. Navigate to the directory containing the script using your terminal or command prompt.
  2. Run the application with the following command:
python remove_shader_cache.py

4. Choose an Action

  • Start Cleanup: Click this to begin deleting all detected shader cache files. If auto-backup is enabled in Settings, a backup will be created first.
  • Dry Run: Click this to perform a simulation. The log will show you everything that would be deleted, but your files will not be touched.
  • Backup Shaders: Click this to create a one-time backup of all detected shader caches to a directory you specify.
  • Stop: Click this button to safely interrupt any ongoing operation.

5. Configure Settings (Optional)

  • Click the Settings button to open the configuration window.
  • Here you can:
    • Enable or disable auto-backups before a cleanup.
    • Set a default backup location.
    • Add, edit, or remove custom directories to be scanned.
    • Toggle detailed logging and the progress bar visibility.
  • Your settings are saved automatically when you click "Save Settings".

Note

  • Administrative Privileges: For best results, run the script with administrative privileges. This ensures it has the necessary permissions to access and delete system-level cache files. To do this, open your Command Prompt or PowerShell as an administrator, navigate to the script's directory, and then run it.
  • Disk Space: Be mindful of disk space if you use the backup feature, as shader caches can sometimes be several gigabytes in size.