Skip to content

About

Decky Loader plugin that clears steamapps/temp across your Steam libraries — for dual-boot setups where interrupted downloads pile up on a shared partition.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Clean Steam Temp

Support me on Ko-fi

A Decky Loader plugin that deletes the contents of steamapps/temp in any of your Steam libraries, straight from the Quick Access menu.

Who this is for

This is a niche tool, and it is worth being upfront about that. Most people will never need it.

It exists for the dual-boot case: a machine running both Linux and Windows, with a shared game partition that both installs of Steam use as a library. That setup has a specific, annoying failure mode.

steamapps/temp is Steam's scratch space for downloads in flight. Interrupt a download — reboot into the other OS, crash, pull the power — and the partial chunks stay on disk. When you come back, it is the other Steam client looking at that library. It has no record of what the first one was doing, so it does not resume and it does not clean up. It just starts over, and the abandoned data sits there.

Do that a few times and steamapps/temp is quietly holding tens of gigabytes of downloads that will never finish. Steam's own tools will not reclaim it: it is not an installed game, so uninstalling does nothing; "Verify integrity of game files" does not look there either. The only fix is deleting the folder contents by hand.

On a desktop that means dropping to a file manager. On a Steam Deck it means leaving Game Mode for Desktop Mode, opening Dolphin, navigating to a path you have to remember, and hoping you are in the right directory before you hit delete. This plugin is that job, done from the Quick Access menu in about four button presses.

If you only run Linux and rarely interrupt a download, you probably do not need this.

Features

  • Auto-detects your Steam libraries by parsing steamapps/libraryfolders.vdf, so external drives, SD cards and shared partitions all show up alongside the internal library.
  • Shows you what you are about to delete — item count and total size of the temp folder, measured with du -sb so sparse files and symlinks are counted correctly.
  • Two-step confirmation before anything is removed.
  • Remembers the library you picked between sessions.
  • Runs as root, which is what makes libraries on mounted external drives reachable at all.
  • Refuses to touch anything that is not a temp folder — every path the backend accepts is rejected unless it ends in steamapps/temp.

Usage

  1. Open the Quick Access menu (... button) and select Clean Steam Temp.
  2. Pick the library you want to clean. The panel shows how many items are in its temp folder and how much space they take.
  3. Press Clean Temp Folder, then Confirm Delete Everything.

The plugin deletes everything inside SteamLibrary/steamapps/temp — the equivalent of rm -rf ./*. The temp directory itself is left in place, which is what Steam expects.

Warning

Close Steam, or at least make sure nothing is downloading, before you clean. Files in temp belong to downloads that are currently running. Deleting them mid-download corrupts the download, and Steam will start it again from zero. There is no undo.

Installing

Grab clean-steam-temp-vX.Y.Z.zip from the latest release, then either:

  • Through Decky Loader — in the Decky settings, use Developer mode → Install Plugin from URL and paste the release asset URL.

  • By hand — copy the zip to the Deck and extract it into the plugins directory:

    sudo unzip clean-steam-temp-v1.0.0.zip -d ~/homebrew/plugins/
    sudo systemctl restart plugin_loader

Development

Requires Node.js v16.14+ and pnpm v9 (sudo npm i -g pnpm@9).

pnpm i
pnpm run build     # rollup -c → dist/index.js
pnpm run watch     # rebuild on change

pnpm run build produces dist/ only. A distributable zip is what CI assembles on every push to main (see .github/workflows/release.yml); locally you can build one with the Decky CLI via the build VSCode task, which needs Docker and sudo.

The VSCode tasks in .vscode/tasks.json cover the full loop — setup, build, deploy (rsync to the Deck over SSH and extract), and restartdecky. Deploy targets live in .vscode/settings.json, which is gitignored and generated from .vscode/defsettings.json on first run; fill in your Deck's IP, user and password before deploying.

Layout

Two halves talking over Decky's RPC bridge:

  • main.py — the backend. Every async def without a leading underscore is exposed over RPC. Library discovery, size measurement, deletion and settings persistence all live here, as does _is_valid_temp_path, the check that keeps a root-privileged rmtree pointed at temp folders and nothing else.
  • src/index.tsx — the entire UI, one Content component. Backend methods are bound with callable<[args], Return>("method_name"); the string has to match the Python method name exactly, and the TypeScript interfaces mirror the dicts Python returns, so changing a return shape means editing both files.

There are no tests and no linter; type checking happens through tsc during the rollup build, with noUnusedLocals and noUnusedParameters on.

Support

This plugin is free and open source, and it will stay that way. If it saved you a trip to Desktop Mode and you feel like saying thanks, you can buy me a coffee — it is genuinely appreciated and it keeps the updates coming ☕

Support me on Ko-fi

License

BSD-3-Clause — see LICENSE. Built from the decky-plugin-template, which is BSD-3-Clause as well.

About

Decky Loader plugin that clears steamapps/temp across your Steam libraries — for dual-boot setups where interrupted downloads pile up on a shared partition.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages