Storage space on the Steam Deck is one of those issues that doesn't really pop up until you need the space. Especially on 64gb Steam Decks, having as much storage as possible is important. The biggest space eater will always be the games we download, but while that can be deleted to make room, the games you download also download a Shader Cache.
The Shader Cache isn't deleted when a game is, so it can really pile up and take over. In retrospect, I had 44gb of Shader Cache just piled up, and while I am lucky to have a 512gb internal card, that is almost 10% of my space! Luckily, MiaPepsi created a wonderful small script called the Deck Cleaner to combat this issue! It is super easy to use and will delete all those pesky shaders for you. Curious how to do it? We got you covered!
Downloading the Script
So first thing you will want to do is...well download the script! Head on over to the Deck Cleaner Github. Currently, the newest version is 1.2, so download the "Source code (zip)" file by clicking on it. Then, just open it and put the file anywhere you want to. I will be putting it on my desktop for demonstration. The download does come with the 1.1 version as well, but make sure to take the 1.2.
Running the Deck Cleaner
Now that the script is downloaded, we have to run it! Before we do though, we have to make the file executable. So right click the file and go to the properties. Once there, go to the Permissions tab and check the executable box.
After that, you can just double click the file, click execute, and you will be prompted on how you want to deal with your shader cache!
You can also move the shadercache to the SD card inserted in your Steam Deck if you so choose. However, I wanted no space to be taken up, so I just clicked Yes.
Adding the Deck Cleaner to Steam
Now that the Deck Cleaner has been set up, we can just add it to Steam and easily access it through Game Mode whenever! All you have to do is right click it, click "Add to Steam", and then it will show up! This can be done with Steam open as well.
After that, when you are in Game Mode, find the non-steam games tab in your library and run the script. You can use the touchpad or set up a control scheme to use the trackpads. But after it is done, it will automatically close and bring you back to your Steam UI.
That's it! Now, periodically, you can go ahead and delete the shader cache to free up some space on your Deck. Super easy right? And again, a HUGE thank you to MiaPepsi for creating this awesome little script. We have talked to her about the possibility of adding in a way to pick and choose which shader cache folders to delete based on the game, which she seemed very open to!
If you liked this guide, check out our most recent one on how to make your games POP with vibrantCrankshaft!
What does this do with Microsoft edge -> Stadia or Gamepass setups?
Does it remove these as well or only game?
I am running a 64 GB version, and have all games installed on Micro SD,
except for the Microsoft Edge.
It should not affect any streaming setups. This is a shadercache that is removed for games that are natively installed!
Just a heads up, this doesn't blow away the cache from only removed games, it blows the entire thing away. Chances are you don't want that.
Yeah I was just thinking the same thing. I only want to delete shader cache for the games the I have deleted. I want to keep the shader cache for games that I still have installed.
Just like Grimmjow said, they are rebuilt as you run the game! Could take slightly longer to load at times, but it generally only happens once with no losses.
But we are working on a special project that could benefit both angles 😉
Caches are rebuilt as you run the game. you arent losing anything.