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
- Steam:
~/.steam/root/compatibilitytools.d.~/.steam/rootlinks to Steam’s real folder:~/.local/share/Steam, or~/.steam/debian-installationwith thesteampackage from Ubuntu’s archive, so the commands here work for both (Flatpak Steam:~/.var/app/com.valvesoftware.Steam/data/Steam/compatibilitytools.d). Proton-GE and other custom builds from ProtonUp-Qt. - Lutris:
~/.local/share/lutris/runners/wine. - Heroic:
~/.config/heroic/tools/wineandtools/proton. - Bottles:
~/.local/share/bottles/runners(Flatpak: under~/.var/app/com.usebottles.bottles/data/bottles/runners).
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:
- Smart Scan › User & App Junk › GPU shader cache: the shaders compiled by Mesa, NVIDIA and Qt, each folder listed with its size. Not pre-selected, skipped while Steam, Lutris, Heroic, Gamescope or Wine/Proton run.
- Smart Scan › User & App Junk › Steam’s shader cache: as its own choice, like other app caches.
- Developer Junk › old Proton and Wine versions: old Proton-GE, Wine-GE and other builds that Steam (
compatibilitytools.d), Lutris, Heroic and Bottles leave behind, deb and Flatpak. The newest of each and the versions a game or bottle is set to use are kept; Steam’s own Proton is never touched. Not pre-selected, skipped while a launcher, Wine, Proton or gamescope runs. - User & App Junk › game launcher caches: installers winetricks and Wine downloaded (
~/.cache/winetricks,~/.cache/wine) and the cover art and temporary installers of Lutris and Heroic, deb and Flatpak. Pre-selected, skipped while a launcher, Wine or Proton runs; Wine prefixes, games and saves are never touched. - User & App Junk › Steam caches (from 2.3.0): the web cache of Steam’s store and library pages (
appcache/httpcache,config/htmlcache), depot manifests, logs and crash dumps, for deb, Flatpak and Snap Steam, often 0.5–2 GB. Pre-selected, skipped while Steam runs; games, downloads, Proton prefixes, saves and your sign-in are never touched.
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.
