CleanMate

All guides · Ubuntu · Updated

Steam, Proton and shader cache eating disk space on Ubuntu: old runners, shader cache, Lutris and Heroic

Where Linux gaming fills your disk and what is safe to delete: old Proton-GE and Wine builds in compatibilitytools.d, Lutris, Heroic and Bottles runners, the Mesa and NVIDIA shader caches, Steam shadercache, and what to keep.

Install on Ubuntu — free and open source

CleanMate for Ubuntu after a scan, listing the GPU shader cache and Steam shader cache with sizes

Gaming on Ubuntu leaves big folders outside your game library: every Proton or Wine build you tried (0.5–1 GB each), shaders your GPU driver compiled, and Steam’s per-game shader caches. On a gaming machine that is easily 5–20 GB.

See how big they are:

du -sh ~/.steam/root/compatibilitytools.d/* ~/.local/share/lutris/runners/wine/* \
  ~/.config/heroic/tools/*/* ~/.var/app/com.usebottles.bottles/data/bottles/runners/* 2>/dev/null
du -sh ~/.cache/mesa_shader_cache* ~/.cache/nvidia/GLCache ~/.nv/GLCache \
  ~/.steam/root/steamapps/shadercache 2>/dev/null

Old Proton and Wine builds

Before deleting a build, check that no game uses it: in Steam, a game’s Properties › Compatibility; in Lutris, a game’s Configure › Runner options; in Heroic, a game’s Settings › Wine; in Bottles, each bottle’s runner. Close the launcher, then delete the old folder:

rm -r ~/.steam/root/compatibilitytools.d/GE-Proton9-1

Keep the newest build of each kind and any a game is set to use. Steam’s own Proton (in steamapps/common/Proton …) is managed by Steam: remove it from the library, not by hand. ProtonUp-Qt or the launcher downloads any build again.

Shader caches

~/.cache/mesa_shader_cache           # Mesa (AMD, Intel): OpenGL and Vulkan
~/.cache/mesa_shader_cache_db
~/.cache/nvidia/GLCache  ~/.nv/GLCache   # NVIDIA
~/.steam/root/steamapps/shadercache  # Steam's pre-compiled shaders, one folder per game

The Steam folder itself is ~/.local/share/Steam/steamapps/shadercache or ~/.steam/debian-installation/steamapps/shadercache; Flatpak: ~/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/shadercache, Snap: ~/snap/steam/common/.local/share/Steam/steamapps/shadercache.

The driver compiles shaders the first time a game needs them and keeps them here. Deleting them is safe with games closed, but be honest with yourself about the cost: the next time you play, the game may stutter while shaders compile again. Worth it for games you no longer play or after a driver change made the old cache useless. Steam’s shadercache/<appid> folder of a game you uninstalled can go anytime.

Lutris and Heroic caches

Lutris keeps downloaded installers and runtime files in ~/.cache/lutris; Heroic keeps its store images and data in ~/.config/heroic (images-cache, store_cache). winetricks keeps downloads in ~/.cache/winetricks. All are downloaded again when needed.

How CleanMate does it

On Ubuntu (all Ubuntu features), CleanMate 2.7.0:

Where Steam, Minecraft and Prism Launcher keep their caches and logs, and what to never delete: game launcher caches. For the rest of an Ubuntu machine, see Free up disk space on Ubuntu as a developer and Snap and Flatpak. Download CleanMate.

FAQ

Is it safe to delete the shader cache? Yes, with games closed. It is rebuilt; the first launch afterwards may stutter briefly.

How do I delete old Proton-GE versions? In ProtonUp-Qt, or delete the folder in compatibilitytools.d after checking no game uses it, then restart Steam.

Will deleting compatibilitytools.d break my games? A game set to a build you deleted won’t start until you pick another build or install it again. Steam’s own Proton is not in that folder.

Why is steamapps/shadercache so big? Steam downloads pre-compiled shaders for each game with Shader Pre-Caching on. Turn it off in Settings › Downloads if you’d rather compile on your machine.

Skip the commands

Open source — star it on GitHub: CleanMate for Ubuntu

How CleanMate decides what is safe to remove →