Repository navigation
Releases
ShaderSweep 2.3.1
Changed
- Starting a clean scrolls the list back to the top, so the running total, the progress bar and the file feed are on screen for the whole run even if the list was scrolled down.
- After a clean, the restart notice folds to one line with its Restart now button beside it, and the explanation opens on a click. The freed total now starts about 100 px higher in the window.
- During a clean, a row that has finished keeps its check mark and size, and its blue bar fades out instead of repeating the same fact.
Fixed
- A file that another program deletes mid-clean is no longer reported as stuck. Temp and launcher folders change while a clean runs, and a file that vanished between being found and being deleted used to count as a failure. With the restart queue on, its missing path was also queued for the next boot. Such a file is now counted as neither freed nor stuck. When the cleaner and another program delete the same file at the same moment, Windows answers the loser with access denied for an instant, so that one case is looked at a second time before a file is called stuck. In a test that removes the files under the cleaner, 392 of 400 were reported as failed before and none are now, and 3,000 repeats of that test under load had no failures.
ShaderSweep 2.3.0
Changed
- A big clean no longer piles up in memory. The walker that finds files is far faster than the threads that delete them, and it used to queue every path it found. Clearing 200,000 files peaked at 43 MB. The queue now holds at most 1,024 paths, and the same run peaks at 8.2 MB with no change in speed (about 19,500 files a second either way).
- Notes that are only good to know, such as running apps or a pending restart, fold down to one line, so the list of caches stays on screen. Anything that needs attention stays in full.
- The window redraws only what changed and keeps keyboard focus on the same control, and progress is drawn once per frame.
- The timer behind the elapsed time and the restart countdown now runs only while one of them is showing, so an idle window does no work.
- Links in the footer and in Options have icons, and so do the drive lines. A drive with under a tenth of its space free is tinted amber.
Added
- Every drive with a cache is shown, not just C:. A Steam library on D: or a World of Warcraft install on E: puts its caches on that drive, so the header now lists free space for each drive that holds one, system drive first. After a real clean the result says how much each drive gained, for example
D: 3.54 GB more free, now 1.42 TB. It appears once the rescan reads the drives, and only for a drive that really gained space. A drive whose Recycle Bin holds items is listed too, since emptying the bin gives space back there. - F5 and Ctrl+R scan again. Before, they reloaded the page and wiped the result on screen. They do nothing while a dialog is open.
Fixed
- Screen readers no longer read the clean out loud as it runs. The big number was a live region, and it changes many times a second while cleaning. A screen reader now hears one sentence when a scan finishes and one when a clean finishes, such as "Clean finished. 11.81 GB freed." The restart countdown is a timer, so it is not read out every second either. Errors still interrupt.
Checked
- No leaks. 400 scans in a row held steady at about 3.5 MB and 250 handles. Filling and clearing a folder 30 times held at about 1.6 MB and 161 handles. 60 clean and scan cycles in the window left the DOM at the same 580 nodes.
- The real app at idle is the 3.2 MB exe plus six WebView2 processes, about 190 MB of committed memory in all and under 1% of one core.
Project
main.tsis split into state, dom, render, actions and one file per view.providers.rsis split into gpu, launchers and housekeeping modules.- Three ignored benchmark tests,
bench_clear,bench_scanandbench_repeat, print time, peak memory and handle counts. SetSHADERSWEEP_BENCH=1and run them withcargo test --release bench_ -- --ignored --nocapture. Without the variable they do nothing, so CI skips the work.
ShaderSweep 2.2.0
Changed
- Cleaning is about three times faster. Files are now deleted by up to eight threads at once instead of one, and deleting starts while the folder is still being read. A delete spends most of its time waiting on the file system and on antivirus, so this scales. Measured through the app's own code on a 16 thread PC, clearing 10,000 files of 8 KB took 1.35 seconds with one thread and 0.46 with eight, the same on repeat runs. A plain delete loop gained little past eight threads, so eight is the cap. Progress, Cancel and the freed-space count behave exactly as before, and the total is still the sum of files actually deleted.
- A preview now ends with a Switch to a real clean button, so there is no trip into Options to turn Preview only off.
Added
- Select Recommended or None above the list, to get back to the default ticks or clear them all in one click. Recommended never ticks a row for an app that is running.
- A confirmation before anything irreversible. If the Recycle Bin or Event Viewer logs are ticked, a real clean first names them and says they cannot be brought back. The safe button has focus, so pressing Enter does nothing risky.
- Intel's shader cache is also looked for under
AppData\Local\Intel\ShaderCache, which some driver builds use, as well as the long standingLocalLowfolder.
Project
- New tests for a large nested folder cleared by many threads and counted exactly, and a cancel test that holds up under threads.
ShaderSweep 2.1.1
Fixed
- Clicking a row near the bottom of the list, such as Discord, could scroll the whole window out of view and leave it looking blank. The invisible checkbox behind each row was not anchored to its row, so focusing it made the browser scroll the entire page to reach it. It now sits inside its own row, and a guard puts the page straight back if anything ever scrolls it. Checked by focusing every row in a long list and confirming the page never moves.
ShaderSweep 2.1.0
Added
- Live progress. While it cleans, the window shows the space freed counting up, a progress bar with a percentage, files removed, elapsed time, a streaming feed of the file being deleted, and a live total on each row. The scan shows which cache it is checking.
- Cancel. Stops a clean between files. What is already gone stays gone, and a stopped run is never recorded as a finished clean.
- Game launcher caches. Discord (including PTB and Canary), Epic Games Launcher, Battle.net, the Steam client web cache, the EA app, Ubisoft Connect, GOG Galaxy and the World of Warcraft
Cachefolder. Each is matched by the tail of its path, so logins, settings,WTF,Interfaceand the games themselves are never in scope. - Running app detection. A row for a program that is open right now starts unticked, says which app to close, and is skipped by default in headless mode. Launcher files are never queued for a restart.
- Windows housekeeping, with the risky rows off by default: temporary files (only files a day old), the thumbnail cache, Delivery Optimization files, Windows Update downloads, Prefetch, error reports and crash dumps, GPU crash dumps, the Recycle Bin and the Event Viewer logs. The Security log is never cleared.
- Restart now. Asks you to save your work, then starts a 60 second countdown you can cancel. It uses the Windows restart API with force turned off, so an app with unsaved changes makes Windows stop and ask. It deliberately avoids
shutdown /r /t, which Microsoft documents as implying/f. - Restart verification. The files queued for deletion are remembered, and on the next launch the app tells you how many Windows removed and how many were still there.
- Install from a terminal. A PowerShell installer that checks the SHA-256 hash and needs no administrator rights, a Scoop manifest, and a Chocolatey package. The release workflow keeps the manifests pointing at the newest release.
- Links to Kkthnx's GitHub and website in the app and the README, opened from a fixed list in the backend.
--includefor headless mode, to add rows that start off.
Changed
- Rows are grouped into shader caches, launchers and housekeeping. Rows with nothing to clear in the last two are hidden.
- The size shown for a row is only what a clean can really remove, so skipped recent files are not promised.
- The driver update notice now says that drivers ignore shaders built for an older version, so cleaning mainly reclaims space and helps when something is wrong.
Safety
- Allow list rules are now the tail of a path, so a bare
Cachefolder is never trusted on its own. - The Explorer folder is only ever cleared through a filter that names the thumbnail database files.
- Tests for the allow list now name the folders beside each cache that must never match.
Project
- Rust backend with 99 tests, including complete scan and clean runs against a made up machine.
ShaderSweep 2.0.0
ShaderSweep, a small Windows app that replaces clicking through the script. The PowerShell script stays in NvidiaShaderCleanup/ for automation and is unchanged.
Added
- A single window that scans first and shows every cache with its size and exact folders before anything is deleted.
- AMD, Intel, Windows DirectX and Steam caches alongside NVIDIA, plus an opt-in row for driver installer leftovers in
C:\AMDandC:\NVIDIA\DisplayDriver. - Driver awareness. It records each GPU's driver version at the last clean and tells you when it changes, with honest wording about when cleaning is actually worth it and a note about NVIDIA's Auto Shader Compilation.
- Names the program holding any file it could not remove, using the Windows Restart Manager.
- Notices when files from an earlier clean are still waiting for a restart, and never queues the same file twice.
- Free disk space for the system drive, a plain explanation under every cache row, and a Copy report button.
- Preview only mode that measures and deletes nothing.
- Every user profile on the machine is covered, not just the current one, along with the system and service profiles.
- Headless mode (
--clean,--preview,--only,--installers,--no-restart-queue) with exit codes, for chaining after a driver install. - The result of each real clean is saved to
last-run.txt, and the app shows how much it has freed in total. - An Open button beside each folder, which only opens folders the app itself manages.
- A tip that NVIDIA caps its cache at 16 GB by default and where to change it.
Changed
- It no longer stops any NVIDIA service or process. Testing showed stopping them made no difference to which files stayed locked, and the restart queue covers the rest, so the riskiest part of the script is gone.
- Freed space is counted per file actually deleted.
Safety
- The interface only sends a row name. The backend rebuilds every path and checks it against a fixed allow list, refusing drive roots,
..paths and junctions. - Links inside a cache are removed without being followed, covered by a test.
Project
- Rust backend with 54 tests, including full scan and clean runs against a made up machine, formatted with rustfmt and clean under clippy with warnings denied.
- CI builds and tests the app on every push, and a tagged release publishes the exe, a zip and a SHA-256 hash.
1.2.0
Clears the NVIDIA and Windows DirectX/OpenGL shader caches in one click.
Download the zip below, extract it, open the NvidiaShaderCleanup folder and double-click NvidiaShaderCleanup.bat. Approve the UAC prompt. Run NvidiaShaderCleanup.bat -DryRun first if you want to see exactly what it would touch.
Fixed
- Services are stopped before the background processes.
nvcontainer.exeis the host process for the NvContainer services, so killing it first made Windows restart the service immediately and re-lock the very caches the tool was about to clear.nvcontaineris off the kill list for the same reason. - Driver held files are handled properly. A few
.nvphindex files are held open by the kernel mode display driver. No process or service can release them, so re-running the tool could never clear them and the old advice to "close your games and try again" was wrong. They are now queued for deletion on the next reboot withMoveFileEx, the same mechanism Windows installers use. This is the real reason NVIDIA's own instructions involve a reboot. - Services that were running at the start are restarted even if they went down some other way.
- Stopped services are restarted from a
finallyblock, so an error part way through can no longer leave the display service down. - Space freed is measured as size before minus size after, so locked files are no longer counted as freed.
Added
- Cache folders are found by name under the known NVIDIA roots rather than hard coded, so new driver layouts such as
PerDriverVersionwork with no code change. This closed real gaps:%APPDATA%\NVIDIA\ComputeCache,OptixCache, theSysWOW64system profile and theServiceProfilesaccounts were all being missed. %__GL_SHADER_DISK_CACHE_PATH%\GLCacheis cleared when that variable has moved the OpenGL cache.- New flags:
-AllUsers,-IncludeD3DSCache,-SkipServices,-SkipRebootSchedule,-LogPath, plus-WhatIfsupport. - Exit codes:
0cleared,1partly cleared,2fatal error. - The launcher passes its arguments through and returns the script exit code.
Full list in CHANGELOG.md.
v1.0.0
NVIDIA Shader Cache Cleanup v1.0.0
First stable release. A one-click Windows utility that clears the NVIDIA and Windows DirectX/OpenGL shader caches.
Run it after a new GPU driver install, or when games start crashing on launch, stuttering, flickering, or showing visual artifacts. The driver and Windows rebuild the caches automatically on the next game launch.
Highlights
- One-click
.batlauncher that auto-requests administrator rights. - Clears all documented NVIDIA and Windows shader-cache locations (current user and system profile), including modern per-driver paths (driver 545.xx+) and legacy
NV_Cachefolders. - Stops NVIDIA background apps and temporarily stops/restarts the NVIDIA Display Container service so locked caches can be cleared, then reports total space freed.
-DryRunpreview mode (shows what would be cleared without deleting anything) and-NoPausefor automation.- Safe by design: only deletes regenerable cache files; skips folders that don't exist; never touches games, saves, settings, or drivers.
Usage
- Download
NvidiaShaderCleanup-v1.0.0.zipbelow and extract it. - Double-click
NvidiaShaderCleanup/NvidiaShaderCleanup.bat. - Approve the UAC prompt and wait for
Cleanup Complete.
See the README for full details and the list of cache locations.
First launch of each game after cleanup may be slower while shaders rebuild. This is normal and one-time.