Skip to content

feat(cli-tools): add vscode-server-gc to prune ~/.vscode-server - #775

Closed
ppat wants to merge 1 commit into
mainfrom
feat/vscode-server-gc
Closed

feat(cli-tools): add vscode-server-gc to prune ~/.vscode-server#775
ppat wants to merge 1 commit into
mainfrom
feat/vscode-server-gc

Conversation

@ppat

@ppat ppat commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Closed — superseded

~/.vscode-server is created by VS Code the moment it connects to a
workspace, independent of whether dotfiles have ever been applied to
that workspace (confirmed: the disposable test Coder workspace
reached ~11 GB of ~/.vscode-server with dotfiles never applied). A
dotfiles-hosted GC script can't cover that case, and the template's
existing weekly cron invoked it via a guard
([ -x $HOME/.local/bin/vscode-server-gc ] && ... || true) that
silently reports success on any workspace where the script isn't
present.

Moved to ppat/coder as a template-owned script instead — see
ppat/coder#869.

Ref: #771

~/.vscode-server grows without bound (8.7 GB observed): interrupted
Remote-SSH downloads left as .staging dirs, server versions VS Code no
longer considers live, their orphaned code-<hash> CLI binaries, and
superseded extension versions. Every deletion here is driven by a
signal VS Code itself already writes to disk (cli/servers/lru.json,
extensions/.obsolete, extensions/extensions.json, the .staging suffix,
and a matching server directory) plus a running-process check, never
by guessing at "newest N" from version numbers or mtimes.

Deploys to $HOME/.local/bin/vscode-server-gc, which the ppat/coder
homelab-workspace template's weekly coder_script already invokes if
present (see scripts.tf's vscode_server_gc resource).

Ref: #771
@ppat

ppat commented Aug 18, 2026

Copy link
Copy Markdown
Owner Author

Superseded by ppat/coder#869 — the GC script belongs in the coder template, not dotfiles. See #771 for the corrected scope and ppat/coder#869 for the implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant